NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
CSS Media Queries Syntax Validation and new HTML tag names


Joined: 07 Sep 2014
Posts: 3
Reply with quote
The syntax validator doesn't seem to recognise CSS media queries or new HTML5 element names.

Image for media queries:



Image for new HTML5 elements:



If I were to auto-format (Alt-F6) I get a warning then the media queries aren't indented properly.
View user's profileFind all posts by jordieSend private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
I think there are some missing names in the CSS parser plus I've previously found that the CSS parser sometimes incorrectly highlights issues depending on previous context, although that might now be fixed (not totally sure).

However, some of what you've highlighted might indicate that your project is set to CSS 2.1 instead of CSS 3.0 - ensure your project is set to both HTML 5 and CSS 3.

Have a look in Project > Project Properties > Run & Debug > Parser properties and you can also set the default in Tools > Settings > Code Insight > Settings > Parser properties
View user's profileFind all posts by plugnplaySend private message


Joined: 07 Sep 2014
Posts: 3
Reply with quote
Oh wow, I can't believe it was that simple. Thank you! Life saver!

There is another issue with PHP auto-formatting, if you know if there is a solution...

When using this style ofcoding
Code:
if():
    //code
endif;

// or

foreach($ray as $val):
    //code
endforeach;
the closing part doesn't get indent formatted properly (see extra tab in bottom left orange box) when using Alt-F6. So you end up with this:

View user's profileFind all posts by jordieSend private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
I use that style myself in HTML templates; unfortunately PhpED does not recognise the PHP structure when using that style Sad

So not only will it not correctly re-indent code or auto-format those structures, it also doesn't find the closing statements (such as endif;) for blocks and it does not allow collapsing of those blocks.
View user's profileFind all posts by plugnplaySend private message


Joined: 22 Apr 2014
Posts: 22
Reply with quote
I use that style as well, and it is quite frustrating to re-indent code and then having to redo half the work myself because of this.
View user's profileFind all posts by infcSend private message


Joined: 18 Apr 2015
Posts: 1
Reply with quote
I think there are some missing names in the CSS parser plus I've previously found that the CSS parser sometimes incorrectly highlights issues depending on previous context, although that might now be fixed (not totally sure). ???

_________________
View user's profileFind all posts by groupSend private message
CSS Media Queries Syntax Validation and new HTML tag names
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic