ApplyTo¶
Description: The applyTo
option property applies its value to the <identifier>
.
Edit
ctr('.test', {
width: 200px
'component-span': {
option: {
applyTo: '.applyTo'
}
font-size: 1em
}
})
.test:
width: 200px
component-span:
option:
applyTo: .applyTo
font-size: 1em
.test {
width: 200px;
}
.test > span .applyTo {
font-size: 1em;
}
ctr('.test', {
width: 200px
'component-span': {
option: {
applyTo: '.applyTo'
}
font-size: 1em
}
})
.test {
width: 200px;
}
.test > span .applyTo {
font-size: 1em;
}
.test:
width: 200px
component-span:
option:
applyTo: .applyTo
font-size: 1em
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
'component-span': {
option: {
appendTo: '.appendTo'
}
font-size: 1em
}
})
.test:
width: 200px
component-span:
option:
appendTo: .appendTo
font-size: 1em
.test {
width: 200px;
}
.test > span.appendTo {
font-size: 1em;
}
ctr('.test', {
width: 200px
'component-span': {
option: {
appendTo: '.appendTo'
}
font-size: 1em
}
})
.test {
width: 200px;
}
.test > span.appendTo {
font-size: 1em;
}
.test:
width: 200px
component-span:
option:
appendTo: .appendTo
font-size: 1em
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
'component-span': {
option: {
override: '#override'
}
font-size: 1em
}
})
.test:
width: 200px
component-span:
option:
override: '#override'
font-size: 1em
.test {
width: 200px;
}
#override {
font-size: 1em;
}
ctr('.test', {
width: 200px
'component-span': {
option: {
override: '#override'
}
font-size: 1em
}
})
.test {
width: 200px;
}
#override {
font-size: 1em;
}
.test:
width: 200px
component-span:
option:
override: '#override'
font-size: 1em
Notes
- Due to the nature of Stylus, this feature only works with a declarative
ctr
instance