Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
RunKit + npm: postcss-rtlcss
node v18.11.0
endpoint
share
tweet
const postcss = require("postcss"); // postcss is a peer dependency. const postcssRtlcss = require("postcss-rtlcss") const input = ` ::view-transition-new(root) { animation: my-animation; } `.trim(); const coverViewTransitionNew = (prefix, selector) => { if (selector.startsWith('::view-transition-new')) { return `${prefix}${selector}`; } } const output = postcss([ postcssRtlcss({ prefixSelectorTransformer: coverViewTransitionNew, safeBothPrefix: true }) ]).process(input); const css = output.css;
Created from: https://npm.runkit.com/postcss-rtlcss
Loading…
Clone and edit this document