Skip to content

Commit

Permalink
Merge branch 'main' into 11717-update-dropdown-story-controls
Browse files Browse the repository at this point in the history
  • Loading branch information
dakahn authored Jul 14, 2022
2 parents fb617e5 + b6cdb30 commit 1b79dd8
Show file tree
Hide file tree
Showing 55 changed files with 2,292 additions and 5,449 deletions.
Binary file not shown.
16 changes: 8 additions & 8 deletions e2e/components/Notifications/Notifications-test.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,24 @@ test.describe('Notifications', () => {
test.describe(theme, () => {
test('toast @vrt', async ({ page }) => {
await snapshotStory(page, {
component: 'Notifications',
id: 'components-notifications--toast',
component: 'Toast',
id: 'components-notifications-toast--default',
theme,
});
});

test('inline @vrt', async ({ page }) => {
await snapshotStory(page, {
component: 'Notifications',
id: 'components-notifications--inline',
component: 'Inline',
id: 'components-notifications-inline--default',
theme,
});
});

test('actionable @vrt', async ({ page }) => {
await snapshotStory(page, {
component: 'Notifications',
id: 'components-notifications--actionable',
component: 'Actionable',
id: 'components-notifications-actionable--default',
theme,
});
});
Expand All @@ -42,8 +42,8 @@ test.describe('Notifications', () => {

test('accessibility-checker @avt', async ({ page }) => {
await visitStory(page, {
component: 'Notifications',
id: 'components-notifications--toast',
component: 'Toast',
id: 'components-notifications-toast--default',
globals: {
theme: 'white',
},
Expand Down
16 changes: 8 additions & 8 deletions packages/grid/scss/_css-grid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -247,21 +247,21 @@
$span: $columns * 0.75;
--cds-grid-columns: #{$span};

grid-column: span #{$span} / span #{$span};
grid-column: span list.slash($span, span) #{$span};
}

.#{$prefix}--#{$name}\:col-span-50 {
$span: $columns * 0.5;
--cds-grid-columns: #{$span};

grid-column: span #{$span} / span #{$span};
grid-column: span list.slash($span, span) #{$span};
}

.#{$prefix}--#{$name}\:col-span-25 {
$span: $columns * 0.25;
--cds-grid-columns: #{$span};

grid-column: span #{$span} / span #{$span};
grid-column: span list.slash($span, span) #{$span};
}
} @else {
@include breakpoint($name) {
Expand All @@ -279,21 +279,21 @@
$span: $columns * 0.75;
--cds-grid-columns: #{$span};

grid-column: span #{$span} / span #{$span};
grid-column: span list.slash($span, span) #{$span};
}

.#{$prefix}--#{$name}\:col-span-50 {
$span: $columns * 0.5;
--cds-grid-columns: #{$span};

grid-column: span #{$span} / span #{$span};
grid-column: span list.slash($span, span) #{$span};
}

.#{$prefix}--#{$name}\:col-span-25 {
$span: $columns * 0.25;
--cds-grid-columns: #{$span};

grid-column: span #{$span} / span #{$span};
grid-column: span list.slash($span, span) #{$span};
}
}
}
Expand Down Expand Up @@ -426,7 +426,7 @@
@if is-smallest-breakpoint($key, $breakpoints) {
--cds-grid-columns: #{$span};

grid-column: span #{$span} / span #{$span};
grid-column: span list.slash($span, span) #{$span};
} @else {
$previous-breakpoint: breakpoint-prev($key, $breakpoints);
$previous-column-count: get-column-count(
Expand All @@ -439,7 +439,7 @@
@include breakpoint($key) {
--cds-grid-columns: #{$span};

grid-column: span #{$span} / span #{$span};
grid-column: span list.slash($span, span) #{$span};
}
}
}
Expand Down
15 changes: 3 additions & 12 deletions packages/grid/scss/_flex-grid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,8 @@
// Add a `max-width` to ensure content within each column does not blow out
// the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
// do not appear to require this.
@if meta.function-exists('div', 'math') {
max-width: math.percentage(math.div($span, $columns));
flex: 0 0 math.percentage(math.div($span, $columns));
} @else {
max-width: math.percentage(($span / $columns));
flex: 0 0 math.percentage(($span / $columns));
}
max-width: math.percentage(math.div($span, $columns));
flex: 0 0 math.percentage(math.div($span, $columns));
}
}

Expand All @@ -87,11 +82,7 @@
/// @group @carbon/grid
@mixin -make-col-offset($span, $columns) {
$offset: 0;
@if meta.function-exists('div', 'math') {
$offset: math.div($span, $columns);
} @else {
$offset: ($span / $columns);
}
$offset: math.div($span, $columns);
@if $offset == 0 {
margin-left: 0;
} @else {
Expand Down
15 changes: 3 additions & 12 deletions packages/grid/scss/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,8 @@
// Add a `max-width` to ensure content within each column does not blow out
// the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
// do not appear to require this.
@if meta.function-exists('div', 'math') {
max-width: math.percentage(math.div($span, $columns));
flex: 0 0 math.percentage(math.div($span, $columns));
} @else {
max-width: math.percentage(($span / $columns));
flex: 0 0 math.percentage(($span / $columns));
}
max-width: math.percentage(math.div($span, $columns));
flex: 0 0 math.percentage(math.div($span, $columns));
}
}

Expand All @@ -81,11 +76,7 @@
/// @group @carbon/grid
@mixin -make-col-offset($span, $columns) {
$offset: 0;
@if meta.function-exists('div', 'math') {
$offset: math.div($span, $columns);
} @else {
$offset: ($span / $columns);
}
$offset: math.div($span, $columns);
@if $offset == 0 {
margin-left: 0;
} @else {
Expand Down
63 changes: 0 additions & 63 deletions packages/layout/scss/_convert.import.scss

This file was deleted.

12 changes: 2 additions & 10 deletions packages/layout/scss/_convert.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ $base-font-size: 16px !default;
@error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
}

@if meta.function-exists('div', 'math') {
@return math.div($px, $base-font-size) * 1rem;
} @else {
@return ($px / $base-font-size) * 1rem;
}
@return math.div($px, $base-font-size) * 1rem;
}

/// Convert a given px unit to a em unit
Expand All @@ -41,9 +37,5 @@ $base-font-size: 16px !default;
@error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
}

@if meta.function-exists('div', 'math') {
@return math.div($px, $base-font-size) * 1em;
} @else {
@return ($px / $base-font-size) * 1em;
}
@return math.div($px, $base-font-size) * 1em;
}
12 changes: 2 additions & 10 deletions packages/layout/scss/modules/_convert.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ $base-font-size: 16px !default;
@error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
}

@if meta.function-exists('div', 'math') {
@return math.div($px, $base-font-size) * 1rem;
} @else {
@return ($px / $base-font-size) * 1rem;
}
@return math.div($px, $base-font-size) * 1rem;
}

/// Convert a given px unit to a em unit
Expand All @@ -41,9 +37,5 @@ $base-font-size: 16px !default;
@error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
}

@if meta.function-exists('div', 'math') {
@return math.div($px, $base-font-size) * 1em;
} @else {
@return ($px / $base-font-size) * 1em;
}
@return math.div($px, $base-font-size) * 1em;
}
Loading

0 comments on commit 1b79dd8

Please sign in to comment.