Skip to content

Commit 1c770a0

Browse files
committed
feat(ui): Sass/SCSS work in progress quasarframework#5049
1 parent 700ae7f commit 1c770a0

File tree

16 files changed

+334
-85
lines changed

16 files changed

+334
-85
lines changed

ui/src/components/btn/QBtn.styl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
button.q-btn
2-
-webkit-appearance button
3-
a.q-btn
4-
display inline-flex
5-
61
.q-btn
72
position relative
83
outline 0
@@ -21,6 +16,11 @@ a.q-btn
2116
font-weight $button-font-weight
2217
text-transform uppercase
2318

19+
button&
20+
-webkit-appearance button
21+
a&
22+
display inline-flex
23+
2424
.q-icon, .q-spinner
2525
font-size $button-line-height
2626

ui/src/components/color/QColor.sass

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
color: white
165165

166166
.q-color-picker__tune-tab input
167-
border: 1px solid alpha(#fff, .3)
167+
border: 1px solid rgba(#fff, .3)
168168

169169
.q-slider
170170
color: $grey-5

ui/src/components/datetime/QDate.sass

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@
107107
padding: 0 8px
108108

109109
&__years-item, &__months-item
110-
flex: 0 0 (round(1 / 3 * 100, 4))%
110+
flex: 0 0 33.3333%
111111

112112
&__months-content
113-
flex: 0 0 (round(10 / 12 * 100, 4))%
113+
flex: 0 0 83.3333%
114114

115115
&.disabled, &--readonly
116116
.q-date__header, .q-date__content

ui/src/components/datetime/QTime.sass

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,21 +118,20 @@
118118

119119
@for $pos from 0 through 11
120120
$degree: (270 + 30 * $pos)
121+
121122
&__clock-pos-#{$pos}
122-
top: round(((1 + sin($degree * 1deg)) * 100%) / 2, 2)
123-
left: round(((1 + cos($degree * 1deg)) * 100%) / 2, 2) /* rtl:ignore */
123+
top: (round(percentage((1 + sin($degree * 1deg)) * 100 / 2)) / 100)
124+
left: (round(percentage((1 + cos($degree * 1deg)) * 100 / 2)) / 100) /* rtl:ignore */
124125

125-
@for $pos from 0 through 12
126-
$degree: (270 + 30 * $pos)
127126
&__clock-pos-#{$pos}.fmt24
128-
top: round(((1 + sin($degree * 1deg)) * 100%) / 2, 2)
129-
left: round(((1 + cos($degree * 1deg)) * 100%) / 2, 2) /* rtl:ignore */
127+
top: (round(percentage((1 + sin($degree * 1deg)) * 100 / 2)) / 100)
128+
left: (round(percentage((1 + cos($degree * 1deg)) * 100 / 2)) / 100) /* rtl:ignore */
130129

131130
@for $pos from 12 through 23
132131
$degree: (270 + 30 * $pos)
133132
&__clock-pos-#{$pos}.fmt24
134-
top: round(15% + ((1 + sin($degree * 1deg)) * 70%) / 2, 2)
135-
left: round(15% + ((1 + cos($degree * 1deg)) * 70%) / 2, 2) /* rtl:ignore */
133+
top: (round(percentage((15 + ((1 + sin($degree * 1deg)) * 70)) / 2) * 100) / 100)
134+
left: (round(percentage((15 + ((1 + cos($degree * 1deg)) * 70)) / 2) * 100) / 100) /* rtl:ignore */
136135

137136
&__now-button
138137
background-color: $primary

ui/src/components/datetime/QTime.styl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,15 @@
118118

119119
for pos in 0..11
120120
$degree = (270 + 30 * pos)
121+
121122
&__clock-pos-{pos}
122123
top round(((1 + sin($degree * 1deg)) * 100%) / 2, 2)
123124
left round(((1 + cos($degree * 1deg)) * 100%) / 2, 2) /* rtl:ignore */
124125

125-
for pos in 0..12
126-
$degree = (270 + 30 * pos)
127126
&__clock-pos-{pos}.fmt24
128127
top round(((1 + sin($degree * 1deg)) * 100%) / 2, 2)
129128
left round(((1 + cos($degree * 1deg)) * 100%) / 2, 2) /* rtl:ignore */
129+
130130
for pos in 12..23
131131
$degree = (270 + 30 * pos)
132132
&__clock-pos-{pos}.fmt24

ui/src/components/dialog-bottom-sheet/BottomSheet.sass

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
margin: 12px 0
3535

3636
&__item
37-
flex: 0 0 (round(1 / 3 * 100, 4))%
37+
flex: 0 0 33.3333%
3838

39-
@media (min-width $breakpoint-sm-min)
39+
@media (min-width: $breakpoint-sm-min)
4040
.q-bottom-sheet__item
41-
flex: 0 0 (round(1 / 4 * 100, 4))%
41+
flex: 0 0 25%

ui/src/components/field/QField.sass

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ $field-transition: .36s cubic-bezier(.4,0,.2,1)
66
color: $input-autofill-color
77

88
.q-field
9-
font-size; $input-font-size
9+
font-size: $input-font-size
1010

1111
&--with-bottom
1212
padding-bottom: 20px

ui/src/components/slider/QSlider.sass

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135

136136
&--dark
137137
.q-slider__track-container
138-
background: alpha(#fff, .3)
138+
background: rgba(#fff, .3)
139139
.q-slider__track-markers
140140
color: white
141141

ui/src/components/virtual-scroll/QVirtualScroll.sass

Lines changed: 0 additions & 51 deletions
This file was deleted.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
.q-virtual-scroll {
2+
&:focus {
3+
outline: none;
4+
}
5+
6+
&__padding {
7+
background: linear-gradient(
8+
transparent,
9+
transparent 20%,
10+
rgba(128, 128, 128, .03) 20%,
11+
rgba(128, 128, 128, .08) 50%,
12+
rgba(128, 128, 128, .03) 80%,
13+
transparent 80%,
14+
transparent
15+
);
16+
background-size: 100% 50px;
17+
18+
.q-table & {
19+
tr { height: 0 !important; }
20+
td { padding: 0 !important; }
21+
}
22+
}
23+
24+
&--horizontal {
25+
display: flex;
26+
flex-direction: row;
27+
flex-wrap: nowrap;
28+
align-items: stretch;
29+
30+
.q-virtual-scroll {
31+
&__content {
32+
display: flex;
33+
flex-direction: row;
34+
flex-wrap: nowrap;
35+
}
36+
37+
&__padding,
38+
&__content,
39+
&__content > * {
40+
flex: 0 0 auto;
41+
}
42+
43+
&__padding {
44+
background: linear-gradient(
45+
to left,
46+
transparent,
47+
transparent 20%,
48+
rgba(128, 128, 128, .03) 20%,
49+
rgba(128, 128, 128, .08) 50%,
50+
rgba(128, 128, 128, .03) 80%,
51+
transparent 80%,
52+
transparent
53+
);
54+
background-size: 50px 100%;
55+
}
56+
}
57+
}
58+
}

0 commit comments

Comments
 (0)