I'm trying to style links in a custom block in bookdown
. The custom block type is called "rmdcomment", and I've added the following to the style.css
file:
.rmdcomment {
padding: 1em 1em 1em 4em;
margin-top: 30px;
margin-bottom: 30px;
background: #1f9ac9;
position:relative;
color: white;
}
.rmdcomment:before {
content: "\f075";
font-family: FontAwesome;
left:10px;
position:absolute;
top:0px;
font-size: 45px;
color: white;
}
The above appears correctly.
I've also added the following in an (unsuccessful) attempt to style the links:
.rmdcomment a:link {text-decoration: underline; font-weight:bold; color:white;}
.rmdcomment a:visited {text-decoration: underline; font-weight:bold; color:white;}
.rmdcomment a:hover {text-decoration: underline; font-weight:bold; color:white;}
I believe this is the section you talking about.
Add !important, so basically you overwrite the previous styles.
.rmdcomment a:link {text-decoration: underline !important; font-weight:bold !important; color:white !important;}