How could I, with SCSS, make the difference between :
#id.class {
color: red;
}
and :
#id .class{
color: blue
}
Because I need something like :
#id {
.class {
color: red;
}
' ' + .class {
color: blue;
}
}
Some of the general differentiation formulas are; Power Rule: (d/dx) (xn ) = nxn-1. Derivative of a constant, a: (d/dx) (a) = 0. Derivative of a constant multiplied with function f: (d/dx) (a. f) = af'
There are a number of simple rules which can be used to allow us to differentiate many functions easily. If y = some function of x (in other words if y is equal to an expression containing numbers and x's), then the derivative of y (with respect to x) is written dy/dx, pronounced "dee y by dee x" .
You need &
to reference to the parent of a selector.
Documentation
#id {
.class {
color: red;
}
&.class {
color: blue;
}
}
Use &
:
#id {
.class {
color: red;
}
&.class {
color: blue;
}
}
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