Skip to content

Commit 282a826

Browse files
authored
Merge pull request #588 from HelixDesignSystem/surf-1894-deprecate-box-less-mixins
refactor(styles): deprecate box LESS mixins for SCSS mixins
2 parents 910bd7f + 111d8e5 commit 282a826

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed

src/less/components/box/index.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
@import (reference) 'vars';
22

3+
/// ======================================== ///
4+
/// MIXINS - DEPRECATED! Use SCSS instead! ///
5+
/// ======================================== ///
6+
37
// TODO: refactor and find a better home for this mixin
48
#HXDiv {
59
.shadyRoot(@rules) {

src/scss/components/_index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// TODO: migrate components from LESS
22
@import "accordion/index";
33
@import "alert/index";
4+
@import "box/index";
45
@import "loader/index";
56
@import "selector-strip/index";
67
@import "typography/index";
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@import "mixins";
2+
3+
// TODO: convert remaining LESS styles
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
@import "vars";
2+
3+
// TODO: refactor and find a better home for this mixin
4+
@mixin hxDiv-shadyRoot { // less: #HXDiv.shadyRoot({...})
5+
> #hxDiv {
6+
@content;
7+
}
8+
}
9+
10+
// less: #Box.xs() -> hxBox(xs)
11+
// less: #Box.sm() -> hxBox(sm)
12+
// less: #Box.md() -> hxBox(md) or box() or box
13+
// less: #Box.lg() -> hxBox(lg)
14+
// less: #Box.xl() -> hxBox(xl)
15+
// less: #Box.xxl() -> hxBox(xxl)
16+
// less: #Box.flush() -> hxBox(flush)
17+
@mixin hxBox($size: md) {
18+
padding: map-get($space, $size);
19+
}

0 commit comments

Comments
 (0)