Skip to content

Commit 2eaeb26

Browse files
authored
Can use: me this self
1 parent 7bb7e45 commit 2eaeb26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

script.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ new MutationObserver(mutations => {
66
if (!node.parentNode) return // Skip if no parent.
77
var scope = 'self__'+(window.cssScopeCount++) // Ready. Make unique scope, example: .self__1234
88
node.parentNode.classList.add(scope)
9-
node.textContent = node.textContent.replace(/\.(me|this|self)(?![a-zA-Z])/g, '.'+scope) // Can use: .me .this .self
9+
node.textContent = node.textContent.replace(/(^|\.|(?<=\s|[^a-zA-Z0-9\-\_]))(me|this|self)(?![a-zA-Z])/g, '.'+scope) // Can use: me this self
1010
node.cssScopeInlineDone = 1
1111
// Optional. Responsive design. Mobile First (above breakpoint): 🟢 None sm md lg xl xx 🏁 Desktop First (below breakpoint): 🏁 xs- sm- md- lg- xl- None 🟢
1212
node.textContent = node.textContent.replace(/(?:@media)\s(xs-|sm-|md-|lg-|xl-|sm|md|lg|xl|xx)/g, // *- matches must be first!

0 commit comments

Comments
 (0)