ApplyTo¶
Description: The applyTo option property applies its value to the <identifier>.
Edit
ctr('.test', {
width: 200px
first-child: {
option: {
applyTo: '.applyTo'
}
font-size: 20px
}
})
.test:
width: 200px
first-child:
option:
applyTo: .applyTo
font-size: 20px
.test {
width: 200px;
}
.test:first-child .applyTo {
font-size: 20px;
}
ctr('.test', {
width: 200px
first-child: {
option: {
applyTo: '.applyTo'
}
font-size: 20px
}
})
.test {
width: 200px;
}
.test:first-child .applyTo {
font-size: 20px;
}
.test:
width: 200px
first-child:
option:
applyTo: .applyTo
font-size: 20px
Notes
- The
applyToproperty differs from theappendToproperty in that there is space between the<identifier>and theapplyTovalueapplyTo<identifier> <applyTo>appendTo<identifier><appendTo>
AppendTo¶
Description: The appendTo option property appends its value to the <identifier>.
Edit
ctr('.test', {
width: 200px
first-child: {
option: {
appendTo: '.appendTo'
}
font-size: 20px
}
})
.test:
width: 200px
first-child:
option:
appendTo: .appendTo
font-size: 20px
.test {
width: 200px;
}
.test:first-child.appendTo {
font-size: 20px;
}
ctr('.test', {
width: 200px
first-child: {
option: {
appendTo: '.appendTo'
}
font-size: 20px
}
})
.test {
width: 200px;
}
.test:first-child.appendTo {
font-size: 20px;
}
.test:
width: 200px
first-child:
option:
appendTo: .appendTo
font-size: 20px
Notes
- The
appendToproperty differs from theapplyToproperty in that there is no space between the<identifier>and theappendTovalueappendTo<identifier><appendTo>applyTo<identifier> <applyTo>
Override¶
Description: The override option property overrides the entirety of the selector, including the <identifier>, with its value.
Edit
ctr('.test', {
width: 200px
first-child: {
option: {
override: '#override'
}
font-size: 20px
}
})
.test:
width: 200px
first-child:
option:
override: '#override'
font-size: 20px
.test {
width: 200px;
}
#override {
font-size: 20px;
}
ctr('.test', {
width: 200px
first-child: {
option: {
override: '#override'
}
font-size: 20px
}
})
.test {
width: 200px;
}
#override {
font-size: 20px;
}
.test:
width: 200px
first-child:
option:
override: '#override'
font-size: 20px
Notes
- Due to the nature of Stylus, this feature only works with a declarative
ctrinstance