-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-factor and streamline the SCSS basics. #351
Conversation
cd51404
to
d10e235
Compare
f8006e6
to
1e6f1b5
Compare
9b54538
to
31fce6c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of stuff going on here. It can be hard to tell search/replace from meaningful comments.
I have some comments here and there about all sorts of stuff.
- There are some changes regarding name changes and the move to mixins where I personally do not understand the value.
- I like that you improve the documentation about our guidelines here.
- Your thoughts about when to use sizing variables or literal values needs to be elaborated. I could not infer your intention from the actual changes.
30055b0
to
6245dd8
Compare
6245dd8
to
d2e999c
Compare
This is a major overhaul and refactoring of all the basics. It moves shared items out of the individual stories, and into mixins, variables and other base files. One of the major things is that it streamlines typography: It introduces a variables.typography.scss file, that defines all the typographies, and a @include typography($VARIABLE) to use them. This way, we can keep track of typographies, and have a single place to look when we make new modules. This way, we also have an easy way of quality-secure against figma. All of this is the first step. There is still a lot of stuff that needs to be fixed. To begin with, I've made sure that all existing classes still work. E.g. '.text-h1' will still compile to the same, but in SCSS we cant use %text-h1 anymore. A future step is to look through all the stuff I've marked as 'legacy', and tweak/remove/edit the classes throughout dpl-cms, react and other places.
d2e999c
to
01351af
Compare
run: yarn css:prettier -- --check | ||
|
||
js_prettier: | ||
markdown-linkt: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Nice work!
A bit of a rubber stamp approval from my side I must admit.
I need to get my fingers dirty in order to get a feeling of it.
Also with my limited experience of working with styling I need to get my fingers dirty to get a feeling of it, rather than looking at page after page with changes 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the others saying ok
Re-factor and streamline the SCSS basics.
This is a major overhaul and refactoring of all the basics.
It moves shared items out of the individual stories, and into
mixins, variables and other base files.
One of the major things is that it streamlines typography:
It introduces a variables.typography.scss file, that defines all
the typographies, and a @include typography($VARIABLE) to use them.
This way, we can keep track of typographies, and have a single place
to look when we make new modules.
This way, we also have an easy way of quality-secure against figma.
All of this is the first step. There is still a lot of stuff that
needs to be fixed.
To begin with, I've made sure that all existing classes still work.
E.g. '.text-h1' will still compile to the same, but in SCSS we cant
use %text-h1 anymore.
A future step is to look through all the stuff I've marked as
'legacy', and tweak/remove/edit the classes throughout dpl-cms, react
and other places.
I've added documentation here - please start by reading that :)
https://github.com/danskernesdigitalebibliotek/dpl-design-system/blob/31fce6cfb1ea1ac682ca51e97118ebc60ce125e1/docs/scss.md