Skip to content

Commit c514a61

Browse files
committed
refactor(form): convert LESS styles to SCSS
1 parent e5775d5 commit c514a61

File tree

6 files changed

+170
-249
lines changed

6 files changed

+170
-249
lines changed

src/less/components.less

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,3 @@
1818
word-spacing: normal;
1919
word-wrap: normal;
2020
}
21-
22-
/* ========== COMPONENTS ========== *\
23-
- Complex CSS Selectors
24-
- NO !important
25-
\* ========== COMPONENTS ========== */
26-
@import 'components/form/index';

src/less/components/form/FieldName.less

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

src/less/components/form/TextControl.less

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

src/less/components/form/index.less

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

src/less/components/form/_hxTextCtrl-DEPRECATED.less renamed to src/scss/components/form/_deprecated.scss

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,47 @@
11
// ----- DEPRECATED ----------
22
//remove in v1.0.0
3+
@import "./mixins/placeholder";
4+
35
.hxTextCtrl {
4-
#Mix.placeholder();
6+
@include hxPlaceholder;
57

6-
background-color: @gray-0;
8+
background-color: $gray-0;
79
border-radius: 2px;
8-
border: 1px solid @gray-500;
9-
color: @gray-900;
10+
border: 1px solid $gray-500;
11+
color: $gray-900;
1012
display: block;
1113
font-size: 1rem; // 16px
1214
height: 2rem;
1315
padding: 0 0.75rem;
1416
width: 100%;
1517

16-
textarea& {
18+
textarea {
1719
min-height: 5.75rem; // ~92px
1820
resize: vertical;
1921
padding: 0.5rem;
2022
}
2123

2224
&:focus {
23-
border-color: @cyan-700;
24-
box-shadow: @focus-glow;
25+
border-color: $cyan-700;
26+
box-shadow: $focus-glow;
2527
outline: 0;
2628

2729
&[invalid] {
28-
box-shadow: @focus-glow-invalid;
30+
box-shadow: $focus-glow-invalid;
2931
}
3032
}
3133

3234
&[invalid] {
33-
border: 2px solid @red-900;
35+
border: 2px solid $red-900;
3436
}
3537

3638
&[disabled] {
37-
#Mix.disabledPlaceholder();
38-
background-color: @gray-50;
39-
border-color: @gray-300;
39+
@include hxPlaceholder(disabled);
40+
41+
background-color: $gray-50;
42+
border-color: $gray-300;
4043
border-width: 1px;
41-
color: @gray-400;
44+
color: $gray-400;
4245
cursor: not-allowed;
4346
resize: none;
4447
}

0 commit comments

Comments
 (0)