You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Pete Whelpton (JIRA)" <ji...@apache.org> on 2019/04/10 11:40:00 UTC
[jira] [Comment Edited] (NETBEANS-1456) Unsupported calc() function
in CSS stylesheets
[ https://issues.apache.org/jira/browse/NETBEANS-1456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16814328#comment-16814328 ]
Pete Whelpton edited comment on NETBEANS-1456 at 4/10/19 11:39 AM:
-------------------------------------------------------------------
Can you provide some examples?
cal() is supported (in a very basic way), but I've done some digging and I can see straight away that there is a problem with nested parenthesis. Before I go too much further, I'm curious if this is the only issue.
At the moment, when calc() is parsed, processing the contents of the parenthesis is delegated to the TokenAcceptor$GenericFunctionContent which seems to allow any token up until it hits a right parenthesis. This is why nested parenthesis fail parsing.
I think there are two possible solutions:
1) Add a new method to TokenAcceptor to handle the specific case of calc()
2) Add the proper parsing rules to the default_module.properties file. The problem with this approach is that GrammarParser treats + - * etc. as modifiers to the grammer. There already appears to be some logic to escape such characters in GrammarParser (by using ' or "), but from a little testing, doesn't seem to work how I thought it should so need to check / amend...
2) Is probably the more future proof solution...
was (Author: peedeeboy):
Can you provide some examples?
cal() is supported (in a very basic way), but I've done some digging and I can see straight away that there is a problem with nested parenthesis. Before I go too much further, I'm curious if this is the only issue.
At the moment, when calc() is parsed, processing the contents of the parenthesis is delegated to the TokenAcceptor$GenericFunctionContent which seems to allow any token up until it hits a right parenthesis. This is why nested parenthesis fail parsing.
I think there are two possible solutions:
1) Add a new method to TokenAcceptor to handle the specific case of calc()
2) Add the proper parsing rules to the default_module.properties file. The problem with this approach is that GrammarParser treats + - * etc. as modifiers to the grammer. There already appears to be some logic to escape such characters in GrammarParser (by using \' or "), but from a little testing, doesn't seem to work how I thought it should so need to check / amend...
2) Is probably the more future proof solution...
> Unsupported calc() function in CSS stylesheets
> ----------------------------------------------
>
> Key: NETBEANS-1456
> URL: https://issues.apache.org/jira/browse/NETBEANS-1456
> Project: NetBeans
> Issue Type: Bug
> Components: web - CSS Editor
> Affects Versions: 9.0
> Environment: Windows 10
> Reporter: Artur Stępień
> Priority: Minor
> Labels: css, easy
>
> The following code in CSS Editor shows as a warning:
> {code:java}
> .modal-dialog-centered {
> min-height: calc(100% - (0.5rem * 2));
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists