zendframework / zend-view

View component from Zend Framework
BSD 3-Clause "New" or "Revised" License
49 stars 61 forks source link

type attribute for the style element is not needed for HTML5 #143

Closed matbech closed 5 years ago

matbech commented 6 years ago

The type attribute is not required for style.

This fixes the following warning from the HTML validator: The type attribute for the style element is not needed and should be omitted.

froschdesign commented 6 years ago

@matbech

The type attribute is not required for style.

This is only true for HTML5, not for XHTML and HTML4.

But you can check the Doctype in a view helper:

$this->view->plugin('doctype')->isHtml5()
froschdesign commented 6 years ago

Thanks for the changes. Now we need unit tests for the new behaviour. Check with and without the doctype HTML5.

weierophinney commented 5 years ago

Closing, as the requested changes made ~1year ago have not been made.