Ticket #12533 (confirmed Bug)

Opened 4 years ago

Last modified 3 years ago

CSS Registory - @media {...} wrapping breaks some CSS

Reported by: arterrey Owned by:
Priority: minor Milestone: 4.x
Component: Templates/CSS Version: 4.1
Keywords: Cc: cwainwright, limi, robzonenet

Description (last modified by arterrey) (diff)

CSS styles are not applied in certain cases when in production mode files are wrapped in a @media {...} bock according the to "CSS Media" property in portal_css.

Found two cases:

1) if the css file has a

@charset "UTF-8";

Firefox will cope with this, but chrome will not use the CSS in that block.

2) if the css file as a

@media [my media definition] {

}

In which case this will cause nested @media blocks. It seems ok to do two level media definitions by have one on the media attribute on the link element and then having a @media definition in the CSS but having a @media inside a @media when the portal_css wraps it doesn't work.

Version Overview

  • Plone 4.1.3 (4112)
  • CMF 2.2.4
  • Zope 2.13.10
  • Python 2.6.6 (r266:84292, Mar 25 2011, 19:36:32) [GCC 4.5.2]

Change History

comment:1 Changed 4 years ago by arterrey

  • Description modified (diff)

comment:2 Changed 4 years ago by eleddy

  • Cc cdw9, limi, robzonenet added
  • severity changed from Untriaged to Normal

comment:3 Changed 4 years ago by cwainwright

  • Cc cwainwright added; cdw9 removed

comment:4 Changed 4 years ago by kleist

  • Status changed from new to confirmed

comment:5 Changed 4 years ago by kleist

  • Milestone set to 4.x

comment:6 Changed 3 years ago by vangheem

I'm a bit unsure what the exact problem is here yet. Can you provide small, complete examples of the problem and expected merging that needs to be done by resource registries?

Note: See TracTickets for help on using tickets.