Skip to content
This repository was archived by the owner on Aug 6, 2021. It is now read-only.
This repository was archived by the owner on Aug 6, 2021. It is now read-only.

Possible references to domain-specific selector names in applyNamespacing #27

Description

@jonknowles

In css.js, there appears to be logic for special behavior for selectors such as '.form-all', '#stage', and '.supernova'. Am I right in assuming that these are specific to the use case that this tool was first developed for and are not related to general CSS rules?

The section with these selector names is here:

css.js/css.js

Lines 568 to 582 in f970443

if(obj.selector.indexOf('@font-face') > -1 || obj.selector.indexOf('keyframes') > -1 || obj.selector.indexOf('@import') > -1 || obj.selector.indexOf('.form-all') > -1 || obj.selector.indexOf('#stage') > -1){
continue;
}
if (obj.type !== 'media') {
var selector = obj.selector.split(',');
var newSelector = [];
for (var j = 0; j < selector.length; j++) {
if (selector[j].indexOf('.supernova') === -1) { //do not apply namespacing to selectors including supernova
newSelector.push(namespaceClass + ' ' + selector[j]);
} else {
newSelector.push(selector[j]);
}
}
obj.selector = newSelector.join(',');

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions