Closed (duplicate)
Project:
Drupal core
Version:
8.3.x-dev
Component:
asset library system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
15 Jul 2012 at 13:44 UTC
Updated:
5 Mar 2017 at 00:30 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
hass commentedComment #2
bkonetzny commentedIdentified the problem in drupal_load_stylesheet_content() in the following line:
This code removes whitespace before and after "@{};,", so fine for regular css, but not for content with @{};, and spaces around it. Content without @{};, will work fine right now.
Comment #3
bkonetzny commentedAttached patch for drupal 7 where content declarations are extracted and saved before whitespace cleanup and inserted afterwards.
Comment #5
hass commentedI think it would be a lot easier if we only replace the spaces with the unicode value \0000a0.
Comment #6
hass commented#3: drupal-css_content_attribute-1686178-3.patch queued for re-testing.
Comment #8
hass commentedComment #8.0
hass commenteda
Comment #8.1
hass commentedA
Comment #9
mikeytown2 commentedPlayed around with this a little bit in #2067249: Add in the ability for the CSS content attribute to be translated. and I would change the preg_replace_callback so that it doesn't use an anonymous function. Also the content regex doesn't match the example given in the Issue Summary. Following regex will match
/content:.*?($double_quot|$single_quot).*?(?:\\;|\\})/.Comment #9.0
mikeytown2 commentedA
Comment #10
john_b commentedThere seems to be a problem with the string
),in selectors. In D7 the aggregator breaksul:not(.contextual-links), body etc, selectors following the comma are lost.Comment #11
anybodyWhat can we do here to take this forward?
This problem occurs again and again and leads to subsequent problems like #2511524: Add a setting to turn on / off css "optimizing".
Comment #12
wim leersWrite a test that causes failures. Then add the fix and show the new test no longer fails.
Comment #16
Anonymous (not verified) commented#936316: CSS aggregation strips some essential whitespace within strings solved this problem.
Before aggregation:
After aggregation:
.calendar-calendar .month-view .full tr td.single-day:before{content:attr(data-day-of-month) ", " attr(headers);font-weight:bold;}Comment #17
Anonymous (not verified) commentedClosed like duplicate #936316: CSS aggregation strips some essential whitespace within strings