ApplyTo¶
Description: The applyTo
option property applies its value to the scope <identifier>
.
Edit
ctr('.test', {
width: 200px
transition: {
option: {
applyTo: '.applyTo'
}
opacity: 1
}
})
.test:
width: 200px
transition:
option:
applyTo: .applyTo
opacity: 1
.test {
width: 200px;
}
.test .applyTo {
opacity: 1;
transition-delay: 0s;
transition-duration: 0.5s;
transition-property: opacity;
transition-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
}
ctr('.test', {
width: 200px
transition: {
option: {
applyTo: '.applyTo'
}
opacity: 1
}
})
.test {
width: 200px;
}
.test .applyTo {
opacity: 1;
transition-delay: 0s;
transition-duration: 0.5s;
transition-property: opacity;
transition-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
}
.test:
width: 200px
transition:
option:
applyTo: .applyTo
opacity: 1
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 scope <identifier>
.
Edit
ctr('.test', {
width: 200px
transition: {
option: {
appendTo: '.appendTo'
}
opacity: 1
}
})
.test:
width: 200px
transition:
option:
appendTo: .appendTo
opacity: 1
.test {
width: 200px;
}
.test.appendTo {
opacity: 1;
transition-delay: 0s;
transition-duration: 0.5s;
transition-property: opacity;
transition-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
}
ctr('.test', {
width: 200px
transition: {
option: {
appendTo: '.appendTo'
}
opacity: 1
}
})
.test {
width: 200px;
}
.test.appendTo {
opacity: 1;
transition-delay: 0s;
transition-duration: 0.5s;
transition-property: opacity;
transition-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
}
.test:
width: 200px
transition:
option:
appendTo: .appendTo
opacity: 1
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 scope <identifier>
, with its value.
Edit
ctr('.test', {
width: 200px
transition: {
option: {
override: '#override'
}
opacity: 1
}
})
.test:
width: 200px
transition:
option:
override: '#override'
opacity: 1
.test {
width: 200px;
}
#override {
opacity: 1;
transition-delay: 0s;
transition-duration: 0.5s;
transition-property: opacity;
transition-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
}
ctr('.test', {
width: 200px
transition: {
option: {
override: '#override'
}
opacity: 1
}
})
.test {
width: 200px;
}
#override {
opacity: 1;
transition-delay: 0s;
transition-duration: 0.5s;
transition-property: opacity;
transition-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
}
.test:
width: 200px
transition:
option:
override: '#override'
opacity: 1
Notes
- Due to the nature of Stylus, this feature only works with a declarative
ctr
instance