Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Use a less likely to collide name for ‘host’ when parsing via cssom.
Browse files Browse the repository at this point in the history
  • Loading branch information
sorvell committed Nov 20, 2013
1 parent 3532ceb commit 0755e8a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/ShadowCSS.js
Original file line number Diff line number Diff line change
Expand Up @@ -518,15 +518,16 @@ var hostRuleRe = /@host[^{]*{(([^}]*?{[^{]*?}[\s\S]*?)+)}/gim,
cssPolyfillUnscopedRuleCommentRe = /\/\*\s@polyfill-unscoped-rule([^*]*\*+([^/*][^*]*\*+)*)\//gim,
cssPseudoRe = /::(x-[^\s{,(]*)/gim,
cssPartRe = /::part\(([^)]*)\)/gim,
// note: :host pre-processed to -host.
cssColonHostRe = /(-host)(?:\(([^)]*)\))?([^,{]*)/gim,
// note: :host pre-processed to -shadowcsshost.
polyfillHost = '-shadowcsshost',
cssColonHostRe = new RegExp('(' + polyfillHost +
')(?:\\(([^)]*)\\))?([^,{]*)', 'gim'),
selectorReSuffix = '([>\\s~+\[.,{:][\\s\\S]*)?$',
hostRe = /@host/gim,
colonHostRe = /\:host/gim,
polyfillHost = '-host',
/* host name without combinator */
polyfillHostNoCombinator = '-host-no-combinator',
polyfillHostRe = /-host/gim;
polyfillHostNoCombinator = polyfillHost + '-no-combinator',
polyfillHostRe = new RegExp(polyfillHost, 'gim');

function stylesToCssText(styles, preserveComments) {
var cssText = '';
Expand Down

0 comments on commit 0755e8a

Please sign in to comment.