I am working on Squarespace for a client who needs to add a special blog post that is different in style. The problem is that this template does not allow this, and the client cannot encode, so I am trying to do this using special CSS in such a way as to prevent errors.
This “special” post has a link with href that contains the word “special”, so I will style them with the css selector:
[href*="Special"] { style }.
My question is that the client will add more special messages, such as "Special landscape", "Special images", "Special theme", etc., I can configure them as follows:
[href*="Special+l"] { style }.
[href*="Special+I"] { style1 }.
[href*="Special+t"] { style2 }.
Is there a way to style them differently based on href without having to know the first letter of the second word? Otherwise, if the customer has placed another second word, the style will not be applied.
I tried with nth-of-type () and so on, but since each link is a child of different blogs, it does not work.
I hope I will explain it myself :)
source
share