Skip to content
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

fix arrow alignment #2037

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions evap/static/scss/components/_grid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@

.col-order {
position: relative;
padding-left: 1em;
padding-left: 1.4em;
cursor: pointer;

&::before, &::after {
Expand All @@ -155,7 +155,7 @@
}

th.col-order {
padding-left: 1.4em;
padding-left: 1.4em !important;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@richardebeling This is now the same as in the rule for just .col-order, so we should be able to just remove this rule altogether, right? I am not sure why exactly we had explicitly different values for the th and non-th rules, maybe @janno42 can remember?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we probably needed th.col-order to be more specific than something else to avoid using !important. removing this line would require us to put !important behind the rule in .col-order.
i would prefer a solution without !important by adding the other classes of the object to the selector for higher specificity (https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity)

Copy link
Member

@niklasmohrin niklasmohrin Oct 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the steps for the authors are then:

  1. Get a rough understanding of specificity
  2. Find clashing selector (the one that is currebtly overwriting our rule; you can find it in the browser's inspector)
  3. Find more specific selector than that
  4. Investigate how we can have the padding value not duplicated, but only written once in the file

... and ask for help at any step and take your time to understand everything as thoroughly as you want :)

(Or, it is also possible that this plan fails because we forgot something, so reach out if something feels odd)


&:empty {
padding-right: 0;
Expand Down