-
Notifications
You must be signed in to change notification settings - Fork 3
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
Line height reduction #856
base: main
Are you sure you want to change the base?
Conversation
I've tidied up and normalized stuff as much as I think I can get away with. The only thing I've left that seems very wrong is the following, which represents a massive
|
although Sass compiles this to put the media queries after the initial declaration - I find it easier to understand if it's also written this way (see below). So when authoring Sass it's: 'here's the general code and then if the browser is this big, do this' rather than 'if the browser is this big, do this, then do all this other stuff' .c-header__journal-title {
font-family: $context--font-family-serif;
line-height: 2.875rem;
font-size: .9375rem;
color: color('black');
@include media-query('md') {
font-size: 1.375rem;
}
@include media-query('lg') {
font-size: 1.6875rem;
}
} I've had a look in the front-end playbook and I couldn't spot guidance on this. |
I won't mention my favouring CSS written in alphabetical order - I'll leave that to another day. |
There is a lot going on here. Seems to include the publishing of a new component The design token updates are very noisy as well, it's very hard to tell what is going on. I'm not sure what is related to the line-height change and what isn't |
@@ -1,5 +1,10 @@ | |||
# History | |||
|
|||
## 31.1.0 (2023-01-09) | |||
* BREAKING: |
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.
If this is breaking, should it not be version 32?
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.
@alexkilgour True, I forgot to sync that when I made it breaking.
$t-icon-checkbox-checked-stroke: #ffffff; |
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.
A lot of file seem to have this !default
removed. Is this related at all to the line-height change or is this from something else and the tokens were not updated?
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.
it's related, when Sass meets two !default
s for the same variable - it takes the first one, rather than the second. This meant that the overriding variable for the nature theme wasn't coming through.
Me adding !default
was a pre-cursor for the single release but I got it wrong here.
Sadly I had added !default
to pretty much every literal
or alias
token so we decided to remove them all, and 'circle back' to their usage later.
@@ -1,6 +1,6 @@ | |||
|
|||
// Do not edit directly | |||
// Generated on Fri, 21 Oct 2022 11:11:43 GMT | |||
// Generated on Mon, 09 Jan 2023 13:28:25 GMT |
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.
There aren't actually any changes to this file, I think we need a way to not generate this line when the file doesn't change as it's extremely noisy
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.
In fact is there any need for this "Generated on" message? Github shows the last changed date
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.
I think we need a way to not generate this
Agreed, I have a task to look at seeing how we can 'test' what has changed and get Style Dictionary to act accordingly.
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.
In fact is there any need for this "Generated on" message?
I guess not - as the 'do not edit directly' message is there.
Github shows the last changed date
We're assuming folks would check this‽ Although tools like VSCode are quite adept at showing this information (even line-by-line).
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.
I think what we need is these files to be auto-generated as part of the package management, then there is no need fo anyone to check anything
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.
Yes, I'd love some form of automation for this so it's not "yet another npm
script" that someone needs to run. It not being on npmjs at the moment is probably scuppering possibilities.
🤞🏼 the single release 🤞🏼
I think it makes more sense as you suggested. I seem to remember sass lint 'recommending' putting the media queries first. But I've just tested it in one of my local projects and no complaint. I may have dreamt it or changed linting config since.. |
@alexkilgour That, naturally, shouldn't be there at all. My editor seems to like dropping one's branch's changes into another's. I'll unstage all that. |
@jon-stevens Would you say this is relevant to this PR? I haven't created/touched those media queries. |
Hi Heydon Me and Ben C have had a go at looking at the changes on your branch with
It appears as though the block-spacing.scss code in default brand context references a variable that doesn't exist: For now we can manually override the code in block-spacing.scss to allow our frontend build to complete, which will allow us to test your changes on our sites locally. But we thought we would let you know as I guess that issue will need to be addressed separately to this PR. Thanks! |
Taking a look at the A hotfix/patch is incoming which should sort this out. Sorry for the bother EDIT I have created the relevant PR that moves towards fixing any issues where we have EDIT EDIT @dsmr this was resolved in #861 and is now released in |
@Heydon as I made the suggestion and it doesn't effect the PR we can ignore it for the interim I reckon. |
Reduction of
line-height
values across brands.See #789