-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for variables in @-moz-document
#767
Comments
I can't reproduce. The style applies to |
Hmm, I'm using Chrome. |
Weird, now it's working ¯\(ツ)/¯ |
When I was testing this out for the GitHub Dark style it seemed like you had to close the browser for the value in the document selector to get picked up, and then from there updating the value from the settings window was an instant change. |
It does work for a |
How are you using the regex? Make sure to double escape special characters, e.g. |
What is this?
I still can't reproduce. According to @Mottie 's comment, I think it might be a live preview issue which is unrelated to
|
A variable is referenced with The regex in question is
And in my case the value in this variable is something like: abc-github.company.com |
No, don't escape the placeholder. I meant escape the period that separates the subdomain. Try this: /* ==UserStyle==
@name _github test
@namespace test
@version 1.0.0
@description test of variables in domain
@advanced text site "Subdomain" "help"
@author Me
==/UserStyle== */
@-moz-document regexp("^https?:///*[[site]]*/\\.github\\.com/.*$") {
body * {
color: red !important;
}
} |
I think this can be closed? We may want to track the live preview issue in a new thread. |
What's the verdict here? Does it work for |
If you are asking about using variables in domain/regexp function, then yes, they work. If you are asking about the live preview issue, then I guess it hasn't been fixed yet. |
Thanks, I was asking about USO vars in |
This issue was opened to discuss the potential of supporting this feature.
When a variable is added inside a
@-moz-document
rule, it initially works, e.g.:The above style does apply to
help.github.com
; but, changing the "Subdomain" value in the settings is not applied until the UserCSS is altered, reverted (so it remains unchanged) and re-saved. Merely changing the variable value does in fact update the UserCSS internally, but (I haven't dug into the code, or remember) the style doesn't apply to the new subdomain until re-saved.So, my question is, should we fix this and would it be useful?
The text was updated successfully, but these errors were encountered: