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: 699
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: 699
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: 23
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 Tutorial PDF


Joined: 14 Apr 2017
Posts: 2
Reply with quote
CSS stands for Cascading Style Sheets. CSS was invited by Hakon Wium Lie on October 10, 1994 and maintained through a group of people within the W3C called the CSS Working Group. The CSS Working Group creates documents called specifications. When a specification has been discussed and officially ratified by W3C members, it becomes a recommendation. CSS is used to define styles for your web pages, including the design, layout and variations in display for different devices and screen sizes. CSS describes how HTML elements are to be displayed on screen, paper, or in other media. CSS is easy to learn and understand but it provides powerful control over the presentation of an HTML document. Most commonly, CSS is combined with the markup languages HTML or XHTML.

CSS files are termed “cascading” stylesheets because of two reasons: one stylesheet can cascade, or have influence over, multiple pages. Similarly, many CSS files can define a single page. We can apply CSS in 3 ways such as Internal CSS, Inline CSS and External CSS.

CSS is designed primarily to enable the separation of document content from document presentation, including aspects such as the layout, colors, and fonts. This separation can improve content accessibility, provide more flexibility and control in the specification of presentation characteristics, enable multiple HTML pages to share formatting by specifying the relevant CSS in a separate .css file, and reduce complexity and repetition in the structural content. Separation of formatting and content makes it possible to present the same markup page in different styles.

_________________
ht
View user's profileFind all posts by ShraddhaKapoorSend 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