Note:

This site is no longer used and is in read-only mode. Instead please go to our new Moodle Developer Resource site.

Talk:CSS Coding Style: Difference between revisions

From MoodleDocs
No edit summary
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
A few questions about these style guidelines, as they seem a bit outdated:  
<p class="note">Note: Please avoid using this talk page to propose changes to the coding style. Instead [https://tracker.moodle.org/secure/CreateIssueDetails!init.jspa?pid=10020&issuetype=1&components=12132&summary=CSS%20coding%20style%20change file a coding style bug]. See the forum discussion [http://moodle.org/mod/forum/discuss.php?d=202406 Using Moodle: Proposing changes to moodle coding style] for more details.</p>
# Do we need to restrict color settings to only HEX? This probably made sense when there was only HEX & RGB, but we now have really cool stuff like HSLA which is supported in all the browsers we support except IE8. It's also very easy to provide fallback to HEX:
<code>
 
  .selector {
    background-color: #hex;
    background-color: hsla(170, 50%, 45%, 1);
  }
 
</code>
# For many properties, browser prefixes are no longer needed for our supported browsers. Shouldn't we be recommending that browser prefixes be added for supported browsers which need them, only? (Also, to make sure there is a background-color fallback for things like gradients?)
# What about !important being a bad thing? If you can't override existing rules without !important, that indicates that existing selectors are too aggressive (usually using IDs rather than classes and elements).
# How about we recommend OOCSS and where you can't use it request classes added to Moodle's markup so you can?

Latest revision as of 08:27, 29 July 2016

Note: Please avoid using this talk page to propose changes to the coding style. Instead file a coding style bug. See the forum discussion Using Moodle: Proposing changes to moodle coding style for more details.