matthiasblaesing commented on code in PR #8409:
URL: https://github.com/apache/netbeans/pull/8409#discussion_r2094093708
##########
ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:
##########
@@ -456,13 +456,32 @@ mediaType
mediaExpression
:
- (LPAREN) => (LPAREN ws? mediaFeature mediaFeatureValue? ws? RPAREN)
+ (LPAREN) => (LPAREN ws? mediaFeatureType ws? RPAREN)
| (HASH) => {isCssPreprocessorSource()}? sass_interpolation_expression_var
;
+mediaComparisonOperator
+ :
+ OPEQ | LESS | LESS_OR_EQ | GREATER | GREATER_OR_EQ
+ ;
+
+mediaRangeExplicitValue
+ : LENGTH | EMS | REM | RESOLUTION
Review Comment:
I think there are potential values missing:
```suggestion
: LENGTH | EXS | EMS | REM | DIMENSION | RESOLUTION
```
##########
ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:
##########
@@ -456,13 +456,32 @@ mediaType
mediaExpression
:
- (LPAREN) => (LPAREN ws? mediaFeature mediaFeatureValue? ws? RPAREN)
+ (LPAREN) => (LPAREN ws? mediaFeatureType ws? RPAREN)
| (HASH) => {isCssPreprocessorSource()}? sass_interpolation_expression_var
;
+mediaComparisonOperator
+ :
+ OPEQ | LESS | LESS_OR_EQ | GREATER | GREATER_OR_EQ
+ ;
+
+mediaRangeExplicitValue
+ : LENGTH | EMS | REM | RESOLUTION
+ ;
+
+mediaFeatureType
+ :
+ mediaFeature (ws? (COLON | mediaComparisonOperator) ws?
(mediaRangeExplicitValue | mediaFeatureValue))?
+ | mediaFeatureRangeContext
+;
+
+mediaFeatureRangeContext
+ :
+ (mediaRangeExplicitValue | mediaFeatureValue) ws? mediaComparisonOperator
ws? mediaFeature (ws? mediaComparisonOperator ws? (mediaRangeExplicitValue |
mediaFeatureValue))?
Review Comment:
This grammar allows:
```css
@media (30em > width < 50em) {}
```
But that is explicitly not supported by the CSS grammar.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists