src/clientVueLoader.js
// Faster than scoped but with the caveat that its styles leak into its children.
Faster than scoped but with the caveat that its styles leak into its children.
Faster than scoped but with the caveat that its styles leak into its children .
async function scopeInsideStyles(context, customAttribute) {
        const cssAttribute = '[' + customAttribute + ']';
        function scopeRule(rule) {
            const scopedSelectors = [];
            rule.selectorText.split(commaRegex).forEach(function (sel) {
                scopedSelectors.push(cssAttribute + ' ' + sel);
                const segments = sel.match(segmentRegex);
                scopedSelectors.push(segments[1] + cssAttribute + (segments[2] || ''));
            });
            return scopedSelectors.join(',') + rule.cssText.substr(rule.selectorText.length);
        }
        return scopeCss(context, cssAttribute, scopeRule);
    }
async function scopeInsideStyles ( context , customAttribute ) { const cssAttribute = '[' + customAttribute + ']' ; function scopeRule ( rule ) { const scopedSelectors = [ ] ; rule . selectorText . split ( commaRegex ) . forEach ( function ( sel ) { scopedSelectors . push ( cssAttribute + ' ' + sel ) ; const segments = sel . match ( segmentRegex ) ; scopedSelectors . push ( segments [ 1 ] + cssAttribute + ( segments [ 2 ] || '' ) ) ; } ) ; return scopedSelectors . join ( ',' ) + rule . cssText . substr ( rule . selectorText . length ) ; } return scopeCss ( context , cssAttribute , scopeRule ) ; }
Faster than scoped but with the caveat that its styles leak into its children.
Faster than scoped but with the caveat that its styles leak into its children .