🇺🇸United States @hotsaucedesign

Account created on 11 August 2009, almost 15 years ago
#

Recent comments

🇺🇸United States hotsaucedesign

Sorted!

🇺🇸United States hotsaucedesign

@Gauravvv

Thank you for the work on your patch. I was working on an MR as part of Florida DrupalCamp last week and got around to finally pushing it up today.

In comparing my MR with your patch, I think there is still room for improvement on this to help modernize the CSS more.

- For .pager__link, .pager__item--current we can do more conversion to CSS Logical properties by changing min-width and height to min-inline-size and block-size respectively

- We can move the CSS variables out of :root and into the .pager class since all of these will apply to anything within pager since it's best practice to not use :root if we don't have to

- In addition, the naming conventions for the pager variables wasn't consistent. Some used one - and some used two, so I adjusted that for consistency sake.

- We can also make CSS variables out of the background images for the .pager__item classes, and then further consolidate the @media (forced-colors: active) query to use these for the mask-image as well like this

.pager__item--first .pager__link::before {
  --background-image: url(../../images/icons/545560/pager-first.svg);
}
.pager__item--previous .pager__link::before {
  --background-image: url(../../images/icons/545560/pager-prev.svg);
}
.pager__item--next .pager__link::after {
  --background-image: url(../../images/icons/545560/pager-next.svg);
}
.pager__item--last .pager__link::after {
  --background-image: url(../../images/icons/545560/pager-last.svg);
}
.pager__item--first .pager__link::before,
.pager__item--previous .pager__link::before,
.pager__item--next .pager__link::after,
.pager__item--last .pager__link::after {
  position: relative;
  display: inline-block;
  inline-size: 1rem;
  block-size: 1rem;
  content: "";
  background-image: var(--background-image);
  background-repeat: no-repeat;
  background-position: center;
}

@media (forced-colors: active) {
  .pager__item--first .pager__link::before,
  .pager__item--previous .pager__link::before,
  .pager__item--next .pager__link::after,
  .pager__item--last .pager__link::after {
    background-color: linktext;
    background-image: none;
    mask-image: var(--background-image);
    mask-repeat: no-repeat;
    mask-position: center;
  }
}

This is, admittedly, my first contribution to Drupal directly but I think that with some tweaking between the patch and the MR we can find the best solutions here.

🇺🇸United States hotsaucedesign

Thank you @Gauravvv, will mark this one as Closed (works as designed)

🇺🇸United States hotsaucedesign

I am working on this.

🇺🇸United States hotsaucedesign

@royalpinto007

Switching to margin-top negates the bottom margin being set, which is needed, and also sets an inherited margin for the side margins, which may be need to be set as 0.

We could refactor this to use:

margin-block: 1em;
margin-inline: 0;

But that is the same as what this file has currently of margin: 1em 0

I think the shorthand for this file is fine and there may not be any actual changes needed here.

Production build 0.69.0 2024