Variable for add() #9

Open
opened 2021-04-04 09:04:49 +00:00 by raphaelbastide · 0 comments
raphaelbastide commented 2021-04-04 09:04:49 +00:00 (Migrated from gitlab.com)

As add() can have a ’copies’ parameter, it can also set a variable being the number of the copy added:

add("margin-top:calc(10*%);","body", 3)

Will output:

div{margin-top:calc(10*1)}
div{margin-top:calc(10*2)}
div{margin-top:calc(10*3)}

Note: This parameter could be also set with CSS variables in order to be also used after the elements are created.

As `add()` can have a ’copies’ parameter, it can also set a variable being the number of the copy added: ``` add("margin-top:calc(10*%);","body", 3) ``` Will output: ``` div{margin-top:calc(10*1)} div{margin-top:calc(10*2)} div{margin-top:calc(10*3)} ``` Note: This parameter could be also set with CSS variables in order to be also used after the elements are created.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tarball/cascade#9
No description provided.