Skip to content

Commit 366d8cf

Browse files
authored
Merge pull request #621 from HelixDesignSystem/surf-1877-convert-drawer-ld-scss
docs(drawer): convert Drawer styles to SCSS
2 parents a54ed98 + 83c691c commit 366d8cf

File tree

6 files changed

+14
-10
lines changed

6 files changed

+14
-10
lines changed
File renamed without changes.

docs/docs.less

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,6 @@ min-version {
315315
@import 'spec/button-spec';
316316
@import 'spec/checkbox-spec';
317317
@import 'spec/choice-tile-spec';
318-
@import 'spec/drawer-spec';
319318
@import 'spec/dropdown-select-spec';
320319
@import 'spec/file-input-spec';
321320
@import 'spec/menu-positioning-spec';

docs/index.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ $demo-padding-color: $magenta-100;
99

1010
// Component-specific Doc Styles
1111
@import "components/index";
12+
13+
// Spec Styles for component test pages
14+
@import "components/drawer/spec";

src/less/components.less

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
@import 'components/button/index';
2727
@import 'components/checkbox/index';
2828
@import 'components/choice-tile/index';
29-
@import 'components/drawer/index';
3029
@import 'components/dropdown-select/index';
3130
@import 'components/file/index';
3231
@import 'components/form/index';

src/scss/components/_index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
@import "badge/index";
44
@import "box/index";
55
@import "breadcrumb/index";
6+
@import "drawer/index";
67
@import "form/index";
78
@import "grid/index";
89
@import "icon/index";

src/less/components/drawer/index.less renamed to src/scss/components/drawer/_index.scss

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1-
@import (reference) 'vars';
1+
@import "vars";
2+
@import "../config";
23

34
hx-drawer:not([hx-defined]) {
45
display: none; // prevent FOUC
56
}
67

78
// These styles should not be shared with ShadyDOM
8-
hx-drawer:extend(.hxComponent) {
9-
background-color: @gray-100;
9+
hx-drawer {
10+
@extend %hxComponent;
11+
background-color: $gray-100;
1012
display: block;
1113
height: 0;
1214
padding: 0;
1315
position: fixed;
1416
width: 0;
15-
z-index: @drawer-z-index;
17+
z-index: $drawer-z-index;
1618
}
1719

1820
#hxDrawer.hx-drawer, // ShadyDOM for polyfilled browsers
@@ -36,17 +38,17 @@ hx-drawer {
3638
}
3739

3840
> hx-div {
39-
background-color: @gray-0;
40-
border-top: 1px solid @gray-400;
41+
background-color: $gray-0;
42+
border-top: 1px solid $gray-400;
4143
flex-grow: 1;
4244
flex-shrink: 1; // necessary for scrolling
4345
order: 3;
4446
overflow-y: auto;
4547
}
4648

4749
> footer {
48-
background-color: @gray-0;
49-
border-top: 1px solid @gray-400;
50+
background-color: $gray-0;
51+
border-top: 1px solid $gray-400;
5052
flex-grow: 9999; // consume as much space as possible
5153
order: 4;
5254
padding: 0.75rem;

0 commit comments

Comments
 (0)