SSWConsulting / SSW.Rules

Generator for ssw.com.au/rules
https://www.ssw.com.au/rules
MIT License
15 stars 13 forks source link

♻️ Improve padding for headings inside greyboxes #1397

Closed tiagov8 closed 2 months ago

tiagov8 commented 4 months ago

cc @hveraus @bettybondoc

Hi team (designers),

Pain

When you have a heading in the 1st line of a greybox, it adds a top padding that is unnecessary.

Tasks

greybox > h1:first-child, greybox > h2:first-child, greybox > h3:first-child, greybox > h4:first-child {
  margin-top:0;
}

Image

https://www.ssw.com.au/rules/awesome-readme/

Thanks!

jeoffreyfischer commented 3 months ago

✅ Done - I have removed top padding from headings if they are the 1st element inside a greybox. I have also removed bottom padding from headings if they are the last element inside a greybox.

Image Figure: Margin is removed for headings at the top or bottom of a greybox

tiagov8 commented 3 months ago

Hey @jeoffreyfischer I forgot to include tasks for other boxes 🤦‍♂️

jeoffreyfischer commented 3 months ago

The changes have been applied to all boxes mentionned by @tiagov8. However, some of them didn't get the style fixed for some reason.

✅ Fixed for

❌ Not fixed for

As per my conversation with Tiago, we have no idea why the second list is not fixed (info, highlight...). We will deploy the changes to Staging to check whether they work there. Note: the main use case was spacing in greybox, so ut's not the end of the world if the other boxes heading spacing is not fixed as they are rarely used.

tiagov8 commented 2 months ago

This is now done ✅

See examples: https://www.ssw.com.au/rules/rule