-
Notifications
You must be signed in to change notification settings - Fork 92
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
add support for inline style css functions #511
Conversation
@spassarop - Can you look into this PR and determine if it's a safe and appropriate change? |
At a minimum, I think some rainy day tests for the added functionality are
in order. Unfortunately, I don't have enough CSS expertise to offer any.
…On Mon, Sep 23, 2024, 1:23 PM Dave Wichers ***@***.***> wrote:
@spassarop <https://github.com/spassarop> - Can you look into this PR and
determine if it's a safe and appropriate change?
—
Reply to this email directly, view it on GitHub
<#511 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAO6PG6ACOMKRWL2G2EQAXLZYBFBNAVCNFSM6AAAAABOVZ2GQSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRYHEYDQOJXGU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
@spassarop Can I please get a review on this PR? |
FYI: Reviewing |
My initial comments: Regarding functionality and tests, a plus is needed. When supporting something it was not before, we try to cover support as much as possible to avoid mid-implementations and potential issue requests. I say this because looking at the documentation just for Another aspect is the security implications of having more functions allowed in CSS. At least the current default policy should be tested, and maybe it is with the |
@spassarop I have modified the code to handle nested functions, fallback and also added some restrictions on |
Thanks. I will do my best effort to check on this with more detail on my computer before Monday because I won’t have it with me for three weeks. Now I only did an overview with my phone. I get the point of checking text values for JS URLs but that is usually trouble because of comparing text instead of other canonical representations. Anyway, maybe at the point you are comparing texts is ok, I just need to run some tests to see the actual behavior instead of just reading on GitHub. |
Ok I checked. Changes are fine. However, as I said before:
At the time the lexical unit processing processing is made, there is no need to check for String value = lexicalValueToString(lu);
if (value == null || !validateValue(property, value)) {
isValid = false;
break;
} So To finish all this, could you just rollback the url+javascript checks? Also, if you haven't done it already, run the maven "site" action so the code gets automatically formatted with certain tab and line length settings that are common across the project. Thanks for your submission! |
@spassarop, I have updated the PR and removed url+javascript checks. Also ran maven site action. |
@spassarop can you please review? |
Custom
style
attributes are stripped from the output and not applied. We need to support inline style css functions for our use-case.adding support for the var(...) css function.
Details can be found at https://jira.atlassian.com/browse/CONFCLOUD-77050
Added tests as well