I am trying to write a nested selector that selects a certain tag that has a certain attribute, for example
<li foo="bar">
To select this, li[foo="bar"]
would work, but I want to nest it under [foo="bar"]
using the scss &
notation because I have other things with the [foo="bar"]
attribute (e.g., <div foo="bar" class="baz">
), and I want to group them together. When I try:
[foo = "bar"]{
&li{
...
}
&.baz{
...
}
}
It returns an error that says li
may only be used at the beginning of a compound selector, and if I try:
[foo = "bar"]{
li&{
...
}
&.baz{
...
}
}
then it says &
may only be used at the beginning of a compound selector. How can I do this correctly?
Use a semicolon to replace a period between related sentences when the second sentence starts with either a conjunctive adverb or a transitional expression, such as for example, for instance, that is, besides, accordingly, furthermore, otherwise, however, thus, therefore.
A semicolon may be used between independent clauses joined by a connector, such as and, but, or, nor, etc., when one or more commas appear in the first clause. Example: When I finish here, and I will soon, I'll be glad to help you; and that is a promise I will keep.
When a comma separates two complete sentences joined by a conjunction (and, but, or, nor, for, so, or yet) the comma and the conjunction can be replaced with a semicolon. I ate dinner, and I went to the movies. = I ate dinner; I went to the movies. She finished top of her class, but she was struggling to find work.
Connecting two related sentences A colon can be used to connect two independent sentences. Typically, a colon is used when the second sentence clarifies or explains the first sentence. For example, Me and my sisters are really excited: We're going to Disneyland!
The right syntax nowadays would be li#{&}
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With