eclipse-ee4j / mojarra

Mojarra, a Jakarta Faces implementation
Other
160 stars 109 forks source link

outputStylesheet is not supporting the media attribute #1198

Closed ren-zhijun-oracle closed 14 years ago

ren-zhijun-oracle commented 15 years ago

outputStylesheet must support the media attribute (see http://www.w3.org/TR/REC-html40/present/styles.html#adef-media).

I'm using a CSS library that requires CSS resources linked as media="all". Omitting that attribute is resulting in broken output.

Environment

Operating System: All Platform: All

Affected Versions

[2.0.0-RC1]

ren-zhijun-oracle commented 6 years ago
ren-zhijun-oracle commented 15 years ago

@javaserverfaces Commented Reported by mahrer

ren-zhijun-oracle commented 15 years ago

@javaserverfaces Commented driscoll said: take ownership

ren-zhijun-oracle commented 15 years ago

@javaserverfaces Commented driscoll said: There is a workaround: use the @media directive in the imported css file.

Also, this change requires a specifcation change. See:

https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=597

ren-zhijun-oracle commented 15 years ago

@javaserverfaces Commented driscoll said: That spec bug's marked as a dup, it's now:

https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=550

ren-zhijun-oracle commented 15 years ago

@javaserverfaces Commented driscoll said: Starting.

ren-zhijun-oracle commented 15 years ago

@javaserverfaces Commented driscoll said: Created an attachment (id=930) Proposed patch

ren-zhijun-oracle commented 15 years ago

@javaserverfaces Commented driscoll said: Update milestone.

ren-zhijun-oracle commented 15 years ago

@javaserverfaces Commented driscoll said: r=rogerk

Changes applied r7599

ren-zhijun-oracle commented 15 years ago

@javaserverfaces Commented driscoll said: Reopening issue. May have to wait for 2.1, since it's a spec change.

ren-zhijun-oracle commented 15 years ago

@javaserverfaces Commented driscoll said: This change has been reverted in the 2.0 codebase (r7639), and applied to the 2.1 codebase.

That means that we won't be fixing it for 2.0, but will instead have it fixed for 2.1, since it requires a spec change (see spec #554).

In the interim, there are two workaronds:

1) Manually use if you need media types 2) If you are relying on resource relocation (such as inside a composite component), then you can place the media type cascades within a @media directive

@media print

{ stuff here; }

@media screen { stuff here; }

You could even put them in separate files, mimicking the media attribute.

I know this workaround is slightly awkward, but it does work with no sideeffects that I'm aware of, so it should be sufficient.

Please reopen the bug if you have any concerns that are not addressed here. Thanks again for your bug report.

ren-zhijun-oracle commented 14 years ago

@javaserverfaces Commented @edburns said: reopen to ensure we get to it in 2.1

ren-zhijun-oracle commented 14 years ago

@javaserverfaces Commented @edburns said: edburns

ren-zhijun-oracle commented 14 years ago

@javaserverfaces Commented @edburns said: Move these to TBD

ren-zhijun-oracle commented 14 years ago

@javaserverfaces Commented @edburns said: While merging this into HEAD, I needed to discover that Jim's fix included changes to the following files:

Index: jsf-api/doc/standard-html-renderkit-base.xml Index: jsf-api/doc/standard-html-renderkit.xml Index: jsf-ri/src/com/sun/faces/renderkit/html_basic/StylesheetRenderer.java Index: jsf-ri/systest/src/com/sun/faces/render/OutputScriptStyleTestCase.java Index: jsf-ri/systest/web/render/outputSheetMedia.xhtml

ren-zhijun-oracle commented 14 years ago

@javaserverfaces Commented @edburns said: Because the work for this was already done, I'm targeting it for 2.1_gf31_m3

ren-zhijun-oracle commented 14 years ago

@javaserverfaces Commented @edburns said: Fix checked in to HEAD, r8437

ren-zhijun-oracle commented 12 years ago

@javaserverfaces Commented @manfredriem said: Closing resolved issue out

ren-zhijun-oracle commented 15 years ago

@javaserverfaces Commented File: Patch_for_1194.patch Attached By: driscoll

ren-zhijun-oracle commented 7 years ago

@javaserverfaces Commented This issue was imported from java.net JIRA JAVASERVERFACES-1194

ren-zhijun-oracle commented 14 years ago

@javaserverfaces Commented Marked as fixed on Friday, June 25th 2010, 3:31:44 am