For example, how do I go about overriding PRE's font-size from 1em (see line 234 in normalize.css) to say 0.8em.

Adding the following to _custom.sass doesn't work because the CSS is always overridden by normalize.css.

/* PRE */
pre
	font-size: 0.8em
	margin-left: 10px
CommentFileSizeAuthor
#3 how_to_best_practice-2644006-3.patch432 bytesjoelpittet

Comments

bisonbleu created an issue. See original summary.

joelpittet’s picture

Component: Documentation » Code
Category: Support request » Bug report

Normalize is supposed to load first this looks like a bug.

joelpittet’s picture

Status: Active » Needs review
StatusFileSize
new432 bytes

Try this patch on for size.

joelpittet’s picture

Title: How to / best practice for overriding normalize.css ? » normalize.css loading after custom CSS
bisonbleu’s picture

Status: Needs review » Reviewed & tested by the community

After some R&D, I discovered that changing the order of CSS files in .info fixed my issue. I just wasn't 100% sure that was proper. Now I know for sure.

Patch works, normalize.css no longer overrides CSS in _custom.sass, thanks :-)

  • joelpittet committed 7afe5a9 on 7.x-4.x
    Issue #2644006 by joelpittet, bisonbleu: normalize.css loading after...
joelpittet’s picture

Status: Reviewed & tested by the community » Fixed

Cool thanks for testing @bisonbleu I've committed this to 4.x-dev.

In the D8 version it was already in there in the right order but I forgot that core already has normalize which is used by classy which we aren't using. But I caught up the version to 3.0.3 instead of 3.0.2 which we have in 7. May do the same for 7... asking the others.

  • joelpittet committed ac890a1 on 8.x-1.x
    Issue #2644006 by joelpittet: normalize.css upgrade to 3.0.3
    

  • joelpittet committed f9664b6 on 7.x-4.x
    Issue #2644006 by joelpittet: normalize.css upgrade to 3.0.3
    
joelpittet’s picture

Upgraded 7 too;)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.