rstudio / pagedown

Paginate the HTML Output of R Markdown with CSS for Print
https://pagedown.rbind.io
Other
892 stars 128 forks source link

Resume: Remove vertical decorator for specific section #260

Open adrian-gadient opened 2 years ago

adrian-gadient commented 2 years ago

I added a new section with publications that doesn't require a vertical bar at the left (used for dates in "normal" sections). I managed to change this section in some regards (e.g., placing text at desired place on page with

). But I can't figure out how to remove the bar, which is distracting here.

remove_decorator.pdf

Is there a way to remove the vertical decorator line after the icon in Resume? I tried to turn it off via a custom CSS file or via a code snippet within the .Rmd file but so far without success. I guess my main problem is that I don't know how to identify / access the element that creates the bar.

Please note that I would like to keep the line for the other sections for which it is useful (e.g., positions).

internaut commented 2 years ago

Had a similar problem.

If you want to remove the vertical line / decorator border for all elements in the page, you need to write the following in a custom CSS:

* {
  --decorator-border: none;
}

To remove it only for specific elements, replace the * with the respective CSS selector.

adrian-gadient commented 2 years ago

Had a similar problem.

If you want to remove the vertical line / decorator border for all elements in the page, you need to write the following in a custom CSS:

* {
  --decorator-border: none;
}

To remove it only for specific elements, replace the * with the respective CSS selector.

Thanks a lot, it worked and I wouldn't have figured this out myself.

For future reference: If you want to include a special icon (mycustomicon) and remove the decorator only for some sections (relevantsection), do this:

In the .Rmd file (no semicolons or colons, just space between the arguments): {#relevantsection data-icon=mycustomicon}

In your custom CSS:

/* Remove decorater for section with ID relevantsection */
[data-id="relevantsection"] {
  --decorator-border: none;
}