Skip to content

Commit 467f32e

Browse files
refactor(box less to scss): surf1888
1 parent a08d32e commit 467f32e

File tree

8 files changed

+70
-317
lines changed

8 files changed

+70
-317
lines changed

docs/components/_index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/// load styles required to demonstrate each component
2+
@import "box/index";
23
@import "grid/index";
34
@import "typography/index";
45

@@ -8,4 +9,3 @@
89
@import "popover/spec";
910
@import "textarea/spec";
1011
@import "text-input/spec";
11-

docs/components/box/_index.scss

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
.box-demo {
2+
.hxBox,
3+
hx-div {
4+
border: $demo-container-border;
5+
}
6+
7+
p {
8+
margin: 0; // FIXME
9+
}
10+
11+
.hxXs {
12+
box-shadow: inset 0 0 0 0.5rem $demo-padding-color;
13+
}
14+
15+
.hxSm {
16+
box-shadow: inset 0 0 0 0.75rem $demo-padding-color;
17+
}
18+
19+
.hxMd {
20+
box-shadow: inset 0 0 0 1.25rem $demo-padding-color;
21+
}
22+
23+
.hxLg {
24+
box-shadow: inset 0 0 0 2rem $demo-padding-color;
25+
}
26+
27+
.hxXl {
28+
box-shadow: inset 0 0 0 3rem $demo-padding-color;
29+
}
30+
31+
.hx2x {
32+
box-shadow: inset 0 0 0 4.5rem $demo-padding-color;
33+
}
34+
}
35+
36+
.example > div.scroll-box-demo {
37+
overflow: hidden;
38+
padding: 0;
39+
40+
> hx-div {
41+
height: 15rem;
42+
43+
&[scroll="both"],
44+
&[scroll="horizontal"] {
45+
white-space: nowrap;
46+
}
47+
}
48+
}
49+

docs/docs.less

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* Styles below are NOT distributed with HelixUI assets *
33
\* ==================================================== */
44
@import (reference) 'vars';
5-
@import (reference) 'components/box/index';
65
// import grid mixins from toolkit
76
@import (reference) 'components/grid/index';
87

@@ -141,21 +140,6 @@ min-version {
141140
}
142141
}
143142

144-
// element metadata container
145-
.metadata {
146-
#Box.md();
147-
background-color: @cyan-50;
148-
border: 1px solid @cyan-100;
149-
box-shadow: inset 0.5rem 0 0 0 @cyan-100;
150-
151-
dt {
152-
#grid.span(3);
153-
}
154-
155-
dd {
156-
#grid.span(9);
157-
}
158-
}
159143

160144
/* ---------------------------------------- *\
161145
* PAGE / CATEGORY STYLING
@@ -194,7 +178,6 @@ min-version {
194178
\* ---------------------------------------- */
195179

196180
// Import from docs/styles/*
197-
@import 'demo/box-docs';
198181
@import 'demo/icon-docs';
199182
@import 'demo/nav-docs';
200183
@import 'demo/panel-docs';

docs/index.scss

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
@import "vars";
2+
@import "components/grid/_config.scss";
3+
@import "components/box/_config.scss";
24

35
// DOCS VARS
46
$demo-container-border: 1px dashed $gray-600;
@@ -11,6 +13,22 @@ $demo-padding-color: $magenta-100;
1113
}
1214
}
1315

16+
// element metadata container
17+
.metadata {
18+
@include box-size(md);
19+
background-color: $cyan-50;
20+
border: 1px solid $cyan-100;
21+
box-shadow: inset 0.5rem 0 0 0 $cyan-100;
22+
23+
dt {
24+
@include grid-span(3);
25+
}
26+
27+
dd {
28+
@include grid-span(9);
29+
}
30+
}
31+
1432
// BASE
1533
@import "./layout";
1634
@import "./test-content";

docs/styles/demo/box-docs.less

Lines changed: 0 additions & 48 deletions
This file was deleted.

src/less/components/box/index.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@
3535
.flush () {
3636
padding: @space[flush];
3737
}
38-
}
38+
}

0 commit comments

Comments
 (0)