Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.
Open
Show file tree
Hide file tree
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
18 changes: 9 additions & 9 deletions assets/css/_page/_single.scss
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@
}
}

> h2,
> h3,
> h4,
> h5,
> h6 {
h2,
h3,
h4,
h5,
h6 {
> .header-mark::before {
content: "|";
margin-right: 0.3125rem;
Expand All @@ -113,16 +113,16 @@
}
}

> h2 > .header-mark::before {
Copy link
Owner

Choose a reason for hiding this comment

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

Hi @WolfeCub,

Can we use something like this?

   > h2,
   > h3,
   > h4,
   > h5,
   > h6,
   > .outline-text-2 > h2,
   > .outline-text-3 > h3,
   > .outline-text-4 > he,
   > .outline-text-5 > h5,
   > .outline-text-6 > h6,
 {
      > .header-mark::before {
        content: "|";
        margin-right: 0.3125rem;
      }
    }

I think it's more performant to use child selectors instead of the descendant selectors.

h2 > .header-mark::before {
content: "#";
}
> h3 > .header-mark::before {
Copy link
Owner

Choose a reason for hiding this comment

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

If the proposal will work, this would be the change:

> .outline-text-3 > h3 > .header-mark::before,
> h3 > .header-mark::before {
  /* ... */
}

h3 > .header-mark::before {
content: "##";
}
> h4 > .header-mark::before {
h4 > .header-mark::before {
content: "###";
}
> h5 > .header-mark::before {
h5 > .header-mark::before {
content: "####";
}
p {
Expand Down
Loading