Refactor Olivero details stylesheet

Created on 29 September 2022, over 2 years ago
Updated 20 March 2023, almost 2 years ago

The current details stylesheet doesn't make use of PostCSS nesting, custom properties, etc.

We can refactor this to make the code more portable, modular, and readable.

📌 Task
Status

Needs review

Version

10.1

Component
Olivero 

Last updated 5 days ago

Created by

🇺🇸United States mherchel Gainesville, FL, US

Live updates comments and jobs are added and updated live.
  • CSS

    It involves the content or handling of Cascading Style Sheets.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇳India gauravvvv Delhi, India

    Addressed #8, attached patch for same.

  • 🇺🇸United States mherchel Gainesville, FL, US

    Is there an interdiff to see what changed?

  • 🇮🇳India gauravvvv Delhi, India

    I tried applying patch #4, but I was getting an error. That's why didn't provided interdiff.

     git apply -v 3312636-4-reroll.patch
    Checking patch core/themes/olivero/css/components/details.css...
    error: while searching for:
    
    /* Width of the entire grid maxes out. */
    
    :root {
      --details-border-width: 1px;
      --details-summary-transition: background-color 0.12s ease-in-out;
    }
    
    .olivero-details {
      display: block;
      margin-block: var(--sp1);
      color: inherit;
      border: var(--details-border-width) solid var(--color--gray-95);
      border-radius: var(--border-radius);
      box-shadow: 0 1px 4px var(--color--gray-90);
    }
    
    /* Details summary styles */
    
    .olivero-details__summary {
      position: relative;
      padding-block: var(--sp1);
      padding-inline-start: var(--sp2);
      padding-inline-end: var(--sp1);
      list-style: none;
      cursor: pointer;
      transition: var(--details-summary-transition);
      word-wrap: break-word;
      -webkit-hyphens: auto;
      hyphens: auto;
      color: inherit;
      background-color: var(--color--gray-100);
      font-size: var(--line-height-s);
      font-weight: 700;
      line-height: var(--sp1);
    }
    
    /* Arrow icon */
    
    .olivero-details__summary:before {
      position: absolute;
      inset-block-start: 50%;
      inset-inline-start: var(--sp0-75);
      display: block;
      width: 0.625rem;
      height: 0.625rem;
      content: "";
      transform: translateY(-50%) rotate(45deg); /* LTR */
      border-top: solid 2px currentColor;
      border-right: solid 2px currentColor;
    
    error: patch failed: core/themes/olivero/css/components/details.css:23
    error: core/themes/olivero/css/components/details.css: patch does not apply
    Checking patch core/themes/olivero/css/components/details.pcss.css...

    I have replaced transition: background-color 0.2s; with

    --details-summary-transition: background-color 0.12s ease-in-out;
    transition: var(--details-summary-transition);

    Also, replaced margin: calc(2 * var(--details-spacing-unit)) calc(1.5 * var(--details-spacing-unit)); with margin: var(--sp1-5) var(--sp2); in the patch.

  • Status changed to RTBC almost 2 years ago
  • 🇺🇸United States smustgrave

    Tested out by enabling Olivero when creating content
    When to node/add/page
    The details section doesn't seem broken. Here's a few screenshots but let me know if there's another section to check.

  • First commit to issue fork.
  • Merge request !102533312636-patch-to-MR-11.x → (Open) created by Unnamed author
  • Create MR from patch 312636-9.patch

  • Pipeline finished with Success
    2 months ago
    Total: 4106s
    #343670
  • 🇮🇳India sagarmohite0031

    Hello,
    Tested and verified,
    Not able to reproduce issue
    Attaching screenshots.

  • 🇺🇸United States smustgrave

    @sagarmohite0031 there is not a need for additional screenshots when the ticket already has them. #12 I added screenshots and there's been no change since. Thanks

    Restoring previous status.

  • 🇫🇷France nod_ Lille

    small nit left, it's a bit longer but it's more consistent.

Production build 0.71.5 2024