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
applyTo
property differs from theappendTo
property in that there is space between the<identifier>
and theapplyTo
valueapplyTo
<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
appendTo
property differs from theapplyTo
property in that there is no space between the<identifier>
and theappendTo
valueappendTo
<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
ctr
instance