-2

Do drupal themes require CSS3 or can they just be HTML5?

  • 1
    it's very inconvinient to theme stuff without css – No Sssweat Feb 19 '15 at 20:59
6

Theoretically, they can "require" neither.

CSS3 is a version of CSS, and while it can incorporate CSS3 in a theme, CSS2 or CSS1 elements (except those deprecated) would still function in a Drupal site and theme. Be aware however, that without CSS of any type, you will not have colour, size, position, fonts or other similar customization of layout outside the browsers default, which will differ from user to user. Take note that most modules and themes will use CSS3 elements.

HTML5 likewise, is a version of the HTML "standard", which really isn't a standard. HTML5 in particular is still under construction by the industry and subject to change at any time, for any reason. Drupal 8 core while technically sets its document type as HTML5, it uses more HTML 4.xx, xhtml than HTML5. Drupal 7 core primarily uses xhtml, yet another variant on the standard. Therefore, you can use 4.xx, xhtml or earlier elements, without using any HTML5 (especially for browser specific elements) to maximize compatibility. Take note however, that most modules and themes now heavily use the new options provided by HTML5 in Drupal 7 or 8, even back ports of Drupal 6.

  • Actually, Drupal 7 uses XHTML+RDFa; it's Drupal 8 that sets the doctype to HTML5. Out of the box, Drupal 7 doesn't use any HTML5 tag. – kiamlaluno Feb 20 '15 at 10:36
  • that's what happens when you are thinking about one thing but looking at and referencing code that represents something completely different :) – Geoff Feb 20 '15 at 16:37
2

I do not think you quite grasp the meaning of what those are. A Drupal them doesn't technically require ANY CSS, and really only the simplest of HTML.

2

Neither CSS3 or HTML5* are necessarily required.

*Drupal incorporates HTML5, but you would be perfectly fine creating a majority if your

In fact most websites are still built using normal'ol CSS and HTML

When you hear people talking about CSS3 and HTML5 (if they are talking about it correctly) they're really referring to all the amazing stuff like transitions, animations, tags and data="" attributes.

A modern website doesn't necessarily require all of those features provided by CSS3. I develop themes using the Omega4 framework and I rarely use even 5%-10% of the power provided by those languages and I consider my themes relatively modern.

1

CSS3 and HTML5 is basically dependent on browser not on Drupal. You can use any CSS3 or HTML5 code considering browser support it.

https://www.drupal.org/node/1516366#comment-5832208

To Answer your question NO does not need CSS3 and it can only be run by using a HTML5.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.