Skip to content

Fix missing semicolon in .d-contents nav a CSS rule#509

Open
soumyaray wants to merge 1 commit into
rstudio:mainfrom
soumyaray:fix-d-contents-nav-a-semicolon
Open

Fix missing semicolon in .d-contents nav a CSS rule#509
soumyaray wants to merge 1 commit into
rstudio:mainfrom
soumyaray:fix-d-contents-nav-a-semicolon

Conversation

@soumyaray

@soumyaray soumyaray commented Jul 10, 2026

Copy link
Copy Markdown

Problem

The .d-contents nav a rule in the article template is missing a semicolon after text-decoration: none, at inst/rmarkdown/templates/distill_article/resources/distill.html (line 289):

.d-contents nav a {
  font-size: 13px;
  border-bottom: none;
  text-decoration: none     /* <- missing semicolon at end of this line */
  color: rgba(0, 0, 0, 0.8);
}

Because the declaration isn't terminated, the CSS parser reads the value of text-decoration as none color: rgba(0, 0, 0, 0.8). That's an invalid value, so the parser discards the whole text-decoration declaration and consumes the color line into it — meaning table-of-contents links get neither the intended text-decoration: none nor the color: rgba(0, 0, 0, 0.8).

The effect is of course only cosmetic (TOC link color/underline fall back through the cascade).

It seems that the only malformed copy is in distill.html so its an easy fix.

Fix

Add the missing semicolon:

   border-bottom: none;
-  text-decoration: none
+  text-decoration: none;
   color: rgba(0, 0, 0, 0.8);

The rule omits the semicolon after 'text-decoration: none', so the CSS parser
reads the value as 'none color: rgba(0, 0, 0, 0.8)', which is invalid and drops
both the text-decoration and color declarations for table-of-contents links.
@soumyaray soumyaray marked this pull request as ready for review July 10, 2026 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant