I’m using relearn theme. I put this code in the css theme.css
a[href~='/[^/]+/[^/]+/'] {
background-color: red;
}
Why don’t want work? Hugo work in a different way?
I want select all a with 2 / in the string of href.
I’m using relearn theme. I put this code in the css theme.css
a[href~='/[^/]+/[^/]+/'] {
background-color: red;
}
Why don’t want work? Hugo work in a different way?
I want select all a with 2 / in the string of href.
Hugo has nothing to do with this.
Because you can’t use a regex expression in an attribute selector.
You probably want something like this:
a[href*="//"]
See docs:
https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors#syntax
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.