Skip to content

Instantly share code, notes, and snippets.

@imliam
Created August 28, 2025 11:13
Show Gist options
  • Select an option

  • Save imliam/a276470dd1d3cd37366ee1fdae24b062 to your computer and use it in GitHub Desktop.

Select an option

Save imliam/a276470dd1d3cd37366ee1fdae24b062 to your computer and use it in GitHub Desktop.
TailwindCSS Variants for Obs.js
/** Requires: https://csswizardry.com/Obs.js/demo/ */
@custom-variant has-bandwidth-high {
&:where(.has-bandwidth-high *) {
@slot;
}
}
@custom-variant has-battery-charging {
&:where(.has-battery-charging *) {
@slot;
}
}
@custom-variant has-connection-capability-strong {
&:where(.has-connection-capability-strong *) {
@slot;
}
}
@custom-variant has-conservation-preference-neutral {
&:where(.has-conservation-preference-neutral *) {
@slot;
}
}
@custom-variant has-cpu-high {
&:where(.has-cpu-high *) {
@slot;
}
}
@custom-variant has-delivery-mode-rich {
&:where(.has-delivery-mode-rich *) {
@slot;
}
}
@custom-variant has-device-capability-strong {
&:where(.has-device-capability-strong *) {
@slot;
}
}
@custom-variant has-latency-low {
&:where(.has-latency-low *) {
@slot;
}
}
@custom-variant has-ram-high {
&:where(.has-ram-high *) {
@slot;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment