springernature / frontend-toolkits

Frontend Component Toolkits for the Elements Design System
MIT License
12 stars 3 forks source link

Default margin and padding of headers is cancelled out #637

Open sonniesedge opened 2 years ago

sonniesedge commented 2 years ago

The default margins and paddings defined earlier in the brand context are cancelled out by the following.

https://github.com/springernature/frontend-toolkits/blob/a53fbc2f76e2df0bfbc9bc4461baa888be1f33d3/context/brand-context/springernature/scss/40-base/layout.scss#L64

Is that intentional @sturobson, or an oversight?

If it's intentional then it feels wrong, as in my project I have to go in again and set these values up later on.

sturobson commented 2 years ago

Hi @sonniesedge.

The only change I've made in this file is moving the font-size on the <body> to use a Sass variable

I agree this feels wrong but I'm not sure why it has been authored this way. Good ol' git blame suggests it's been like this for two years (although I could be completely misreading it).

Having spent quite a bit of time working through the various Sass files in the front-end toolkits (and also some hairy stuff that relied on Ruby Sass) there's quite a few things I've noted that well do with some further thought and improvement.

Of course, that doesn't help you here.

I'm thinking (whilst on the sofa) that the quickest 'fix' that would resolve this for you and not set fireworks off further down the cascade would be to swap these two lines around in the enhanced.scss file.

Happy to do some digging in the morning and create the relevant PR for this.

🙏🖤

sturobson commented 1 year ago

There has been no update on this issue for 30 days. It is now marked as "stale". If you think this issue is still relevant and needs attention then reply with an update. If there is no update in 14 days, this issue will be closed.