Skip to content

Commit 831673f

Browse files
authored
feat: remove legacy styles fallbacks (#1363)
1 parent d0efcb0 commit 831673f

File tree

1 file changed

+1
-38
lines changed

1 file changed

+1
-38
lines changed

src/styles/index.scss

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,7 @@
2929
}
3030

3131
@mixin ct-align-justify($ct-text-align: $ct-text-align, $ct-text-justify: $ct-text-justify) {
32-
-webkit-box-align: $ct-text-align;
33-
-webkit-align-items: $ct-text-align;
34-
-ms-flex-align: $ct-text-align;
3532
align-items: $ct-text-align;
36-
-webkit-box-pack: $ct-text-justify;
37-
-webkit-justify-content: $ct-text-justify;
38-
-ms-flex-pack: $ct-text-justify;
3933
justify-content: $ct-text-justify;
4034
// Fallback to text-align for non-flex browsers
4135
@if ($ct-text-justify == 'flex-start') {
@@ -47,16 +41,6 @@
4741
}
4842
}
4943

50-
@mixin ct-flex() {
51-
// Fallback to block
52-
display: block;
53-
display: -webkit-box;
54-
display: -moz-box;
55-
display: -ms-flexbox;
56-
display: -webkit-flex;
57-
display: flex;
58-
}
59-
6044
@mixin ct-chart-label($ct-text-color: $ct-text-color, $ct-text-size: $ct-text-size, $ct-text-line-height: $ct-text-line-height) {
6145
fill: $ct-text-color;
6246
color: $ct-text-color;
@@ -120,7 +104,7 @@
120104

121105
.#{$ct-class-chart-line} .#{$ct-class-label},
122106
.#{$ct-class-chart-bar} .#{$ct-class-label} {
123-
@include ct-flex();
107+
display: flex;
124108
}
125109

126110
.#{$ct-class-chart-pie} .#{$ct-class-label},
@@ -130,63 +114,42 @@
130114

131115
.#{$ct-class-label}.#{$ct-class-horizontal}.#{$ct-class-start} {
132116
@include ct-align-justify(flex-end, flex-start);
133-
// Fallback for browsers that don't support foreignObjects
134-
text-anchor: start;
135117
}
136118

137119
.#{$ct-class-label}.#{$ct-class-horizontal}.#{$ct-class-end} {
138120
@include ct-align-justify(flex-start, flex-start);
139-
// Fallback for browsers that don't support foreignObjects
140-
text-anchor: start;
141121
}
142122

143123
.#{$ct-class-label}.#{$ct-class-vertical}.#{$ct-class-start} {
144124
@include ct-align-justify(flex-end, flex-end);
145-
// Fallback for browsers that don't support foreignObjects
146-
text-anchor: end;
147125
}
148126

149127
.#{$ct-class-label}.#{$ct-class-vertical}.#{$ct-class-end} {
150128
@include ct-align-justify(flex-end, flex-start);
151-
// Fallback for browsers that don't support foreignObjects
152-
text-anchor: start;
153129
}
154130

155131
.#{$ct-class-chart-bar} .#{$ct-class-label}.#{$ct-class-horizontal}.#{$ct-class-start} {
156132
@include ct-align-justify(flex-end, center);
157-
// Fallback for browsers that don't support foreignObjects
158-
text-anchor: start;
159133
}
160134

161135
.#{$ct-class-chart-bar} .#{$ct-class-label}.#{$ct-class-horizontal}.#{$ct-class-end} {
162136
@include ct-align-justify(flex-start, center);
163-
// Fallback for browsers that don't support foreignObjects
164-
text-anchor: start;
165137
}
166138

167139
.#{$ct-class-chart-bar}.#{$ct-class-horizontal-bars} .#{$ct-class-label}.#{$ct-class-horizontal}.#{$ct-class-start} {
168140
@include ct-align-justify(flex-end, flex-start);
169-
// Fallback for browsers that don't support foreignObjects
170-
text-anchor: start;
171141
}
172142

173143
.#{$ct-class-chart-bar}.#{$ct-class-horizontal-bars} .#{$ct-class-label}.#{$ct-class-horizontal}.#{$ct-class-end} {
174144
@include ct-align-justify(flex-start, flex-start);
175-
// Fallback for browsers that don't support foreignObjects
176-
text-anchor: start;
177145
}
178146

179147
.#{$ct-class-chart-bar}.#{$ct-class-horizontal-bars} .#{$ct-class-label}.#{$ct-class-vertical}.#{$ct-class-start} {
180-
//@include ct-chart-label($ct-text-color, $ct-text-size, center, $ct-vertical-text-justify);
181148
@include ct-align-justify(center, flex-end);
182-
// Fallback for browsers that don't support foreignObjects
183-
text-anchor: end;
184149
}
185150

186151
.#{$ct-class-chart-bar}.#{$ct-class-horizontal-bars} .#{$ct-class-label}.#{$ct-class-vertical}.#{$ct-class-end} {
187152
@include ct-align-justify(center, flex-start);
188-
// Fallback for browsers that don't support foreignObjects
189-
text-anchor: end;
190153
}
191154

192155
.#{$ct-class-grid} {

0 commit comments

Comments
 (0)