Custom css reference methods used differently

13 views
Skip to first unread message

ycproject

unread,
Apr 29, 2023, 10:15:11 PM4/29/23
to sphinx-users


I have written the following in customstyle.css like this:

.dash2 {
    border-bottom: underline.
    border-bottom-style: dashed.
    border-bottom-width: 2px.
}    
   
.yellow {
    color: yellow.
}  

And this customstyle.css is referenced in conf.py:

 html_css_files = [ 'css/customstyle.css'.
]


Later, when editing the .rst file, I have to comment out the .rst file in advance when using dash2:

... role:: dash2
   :class:: dash2

before it can be used in the following way:

dash2 underline-dashed\ :dash2:`under dashed text`\ test.

But, when using yellow, the .rst file does not need to be similar to:

... role:: yellow
   :class: yellow

I can use it directly in the .rst file by declaring something like:

yellow-colored text\ :yellow-colored text`\ test.

Why are .dash2 and .yellow used differently?

===================
System Environment:

Debaian11-x64 gnome
Sphinx-build: 3.4.3
Sphinx-rtd-theme
Reply all
Reply to author
Forward
0 new messages