Skip to content

Commit 7c654d9

Browse files
sebastianthulinSebastian Thulin
andauthored
feat: css improvements (#1018)
* fix: size of buttons * fix: set valid ascpect ratio * fix: increase size of pagination buttons * fix: increase size of siteselector * fix: set valid default value of animationDirection. * fix: remove empty line value. * fix: vertically align as baseline in icon only buttons. * fix: do not create invalid padding utils. * fix: resolve invalid text transform default value * fix: do not create auto padding value. * fix: set font weight without '' * fix: set outline-offset to a valid value * fix: all spacing utils * fix: add support for psuedo in build-util mixin * fix: resolve psuedo elements in responsive styles. * fix: broken font declaration * fix: remove invalid left/right values * fix: remove invalid values from align-items modifier. * fix: set value display attr. * fix: size of buttons * fix: set valid ascpect ratio * fix: increase size of pagination buttons * fix: increase size of siteselector * fix: set valid default value of animationDirection. * fix: remove empty line value. * fix: vertically align as baseline in icon only buttons. * fix: do not create invalid padding utils. * fix: resolve invalid text transform default value * fix: do not create auto padding value. * fix: set font weight without '' * fix: set outline-offset to a valid value * fix: all spacing utils * fix: add support for psuedo in build-util mixin * fix: resolve psuedo elements in responsive styles. * fix: broken font declaration * fix: remove invalid left/right values * fix: remove invalid values from align-items modifier. * fix: set value display attr. * fix: negative margin in signature. * fix: faulty colors & negative margins. * fix: resolves issues with alignment of icons. * fix: resolve baseline in icon only buttons * fix: remove invalid css for font display * fix: remove old ie support from leaflet lvml * fix: remove deprecated clip * fix: remove deprecated word-wrap * fix: clip path value * fix: remove old css * fix: remove autprefixer * fix: remove autoprefixer * fix: set visibility hidden instead of display none --------- Co-authored-by: Sebastian Thulin <sebastian.thulin@helsingborg.se>
1 parent dadf232 commit 7c654d9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+4028
-4614
lines changed

package-lock.json

Lines changed: 3889 additions & 4044 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@
3838
"bugs": {
3939
"url": "https://github.com/helsingborg-stad/styleguide/issues"
4040
},
41-
"browserslist": [
42-
"last 3 version",
43-
"> 1%",
44-
"not dead"
45-
],
4641
"homepage": "https://github.com/helsingborg-stad/styleguide#readme",
4742
"devDependencies": {
4843
"@babel/cli": "^7.17.0",
@@ -57,7 +52,6 @@
5752
"@testing-library/user-event": "^14.4.3",
5853
"@types/jest": "^29.5.0",
5954
"@types/leaflet": "^1.9.3",
60-
"autoprefixer": "^10.4.2",
6155
"babel-loader": "^8.2.3",
6256
"babel-upgrade": "^1.0.1",
6357
"body-parser": "^1.19.1",

postcss.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
module.exports = {
22
plugins: [
3-
require('autoprefixer')({
4-
overrideBrowserslist: ['> 1%', 'last 4 versions']
5-
}),
63
require('cssnano')
74
]
85
};

source/sass/component/_breadcrumb.scss

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
&__list {
1111
@include unlist();
12-
1312
display: flex;
1413
flex-wrap: wrap;
1514
align-items: center;
@@ -20,15 +19,13 @@
2019
padding: 0 map-get($spacers, "1") 0 0;
2120
margin: 0;
2221
color: $color-breadcrumb-active;
23-
display: none;
24-
25-
/* Mobile adaption */
26-
&:nth-last-child(2) {
27-
display: block;
28-
}
22+
display: flex;
23+
gap: map-get($spacers, "05");
2924

30-
@include mq(map_get($breakpoints-map, "sm")) {
31-
display: block;
25+
@include mq(map_get($breakpoints-map, "xs"), map_get($breakpoints-map, "sm")) {
26+
&:not(:last-child) {
27+
display: none;
28+
}
3229
}
3330
}
3431

@@ -41,8 +38,7 @@
4138

4239
.c-icon {
4340
color: $color-breadcrumb-icon;
44-
vertical-align: -15%; /* TODO: Fix */
45-
41+
align-self: center;
4642
@include mq(map_get($breakpoints-map, "xs"), map_get($breakpoints-map, "sm")) {
4743
transform: scaleX(-1);
4844
}

source/sass/component/_button.scss

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ $c-button-border-width: var(--c-button-border-width, $border-width-button) !defa
173173
}
174174

175175
&.c-button--md {
176-
height: calc(#{$base} * 6);
176+
height: calc(#{$base} * 6.5);
177177
min-width: calc(#{$base} * 9);
178178
padding: 0 calc(#{$base} * 4);
179179
font-size: $font-size-btn-md;
@@ -184,7 +184,7 @@ $c-button-border-width: var(--c-button-border-width, $border-width-button) !defa
184184
}
185185

186186
&.c-button--icon-only {
187-
width: calc(#{$base} * 6);
187+
width: calc(#{$base} * 6.5);
188188
min-width: initial;
189189
}
190190

@@ -200,7 +200,7 @@ $c-button-border-width: var(--c-button-border-width, $border-width-button) !defa
200200

201201
&.c-button--sm {
202202
letter-spacing: 0.1rem;
203-
height: calc(#{$base} * 4.5);
203+
height: calc(#{$base} * 5.5);
204204
min-width: calc(#{$base} * 6.75);
205205
padding: 0 calc(#{$base} * 2);
206206
font-size: $font-size-btn-sm;
@@ -214,7 +214,7 @@ $c-button-border-width: var(--c-button-border-width, $border-width-button) !defa
214214
}
215215

216216
&.c-button--icon-only {
217-
width: calc(#{$base}* 4.5);
217+
width: calc(#{$base}* 5.5);
218218
min-width: initial;
219219
}
220220

@@ -243,6 +243,10 @@ $c-button-border-width: var(--c-button-border-width, $border-width-button) !defa
243243
margin-right: 0;
244244
margin-left: 0;
245245
}
246+
247+
.c-icon::after {
248+
vertical-align: baseline;
249+
}
246250
}
247251
}
248252

0 commit comments

Comments
 (0)