Skip to content

refactor(directives): wrap styles in base layer #15759

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: simeonoff/scoped-styles
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@use 'sass:map';
@use '../../base' as *;
@use '../../themes/schemas' as *;
@use '../../../styles/themes/standalone' as *;

////
/// @group themes
Expand Down Expand Up @@ -61,15 +62,17 @@
/// @see {mixin} css-vars
/// @param {Map} $theme - The theme used to style the component.
@mixin highlight($theme) {
@include css-vars($theme);
@include layer(base) {
@include css-vars($theme);

%igx-highlight {
color: var-get($theme, 'resting-color');
background: var-get($theme, 'resting-background');
}
%igx-highlight {
color: var-get($theme, 'resting-color');
background: var-get($theme, 'resting-background');
}

%igx-highlight--active {
color: var-get($theme, 'active-color');
background: var-get($theme, 'active-background');
%igx-highlight--active {
color: var-get($theme, 'active-color');
background: var-get($theme, 'active-background');
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@use 'sass:map';
@use '../../base' as *;
@use '../../themes/schemas' as *;
@use '../../../styles/themes/standalone' as *;

////
/// @group themes
Expand Down Expand Up @@ -45,23 +46,25 @@
/// @see {mixin} css-vars
/// @param {Map} $theme - The theme used to style the component.
@mixin ripple($theme) {
@include css-vars($theme);
@include layer(base) {
@include css-vars($theme);

%igx-ripple-display {
display: block;
position: absolute;
border-radius: border-radius(50%);
background: var-get($theme, 'color');
pointer-events: none;
transform-origin: center;
transform: translate3d(0, 0, 0) scale(0);
will-change: opacity, transform;
opacity: .5;
margin: 0 !important;
border: none !important;
}
%igx-ripple-display {
display: block;
position: absolute;
border-radius: border-radius(50%);
background: var-get($theme, 'color');
pointer-events: none;
transform-origin: center;
transform: translate3d(0, 0, 0) scale(0);
will-change: opacity, transform;
opacity: .5;
margin: 0 !important;
border: none !important;
}

%igx-ripple-wrapper {
overflow: hidden;
%igx-ripple-wrapper {
overflow: hidden;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@use 'sass:map';
@use '../../base' as *;
@use '../../themes/schemas' as *;
@use '../../../styles/themes/standalone' as *;

////
/// @group themes
Expand Down Expand Up @@ -72,28 +73,30 @@
/// @see {mixin} css-vars
/// @param {Map} $theme - The theme used to style the component.
@mixin tooltip($theme) {
@include css-vars($theme);
$variant: map.get($theme, '_meta', 'variant');
@include layer(base) {
@include css-vars($theme);
$variant: map.get($theme, '_meta', 'variant');

%tooltip-display {
display: inline-flex;
justify-content: center;
flex-flow: column wrap;
background: var-get($theme, 'background');
color: var-get($theme, 'text-color');
border-radius: var-get($theme, 'border-radius');
box-shadow: map.get($theme, 'shadow');
margin: 0 auto;
padding: 0 rem(8px);
min-height: rem(24px);
%tooltip-display {
display: inline-flex;
justify-content: center;
flex-flow: column wrap;
background: var-get($theme, 'background');
color: var-get($theme, 'text-color');
border-radius: var-get($theme, 'border-radius');
box-shadow: map.get($theme, 'shadow');
margin: 0 auto;
padding: 0 rem(8px);
min-height: rem(24px);

@if $variant == 'indigo' {
padding: rem(4px) rem(8px);
@if $variant == 'indigo' {
padding: rem(4px) rem(8px);
}
}
}

%tooltip--hidden {
display: none;
%tooltip--hidden {
display: none;
}
}
}

Expand Down