javaee / mojarra

PLEASE NOTE: This project has moved to Eclipse Foundation and will be archived under the JavaEE GitHub Organization. After Feb. 1, 2021, the new location will be github.com/javaee/mojarra. Mojarra - Oracle's implementation of the JavaServer Faces specification
https://github.com/eclipse-ee4j/mojarra
Other
164 stars 58 forks source link

outputStylesheet is not supporting the media attribute #1198

Closed javaserverfaces closed 14 years ago

javaserverfaces 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]

javaserverfaces commented 15 years ago

Reported by mahrer

javaserverfaces commented 15 years ago

driscoll said: take ownership

javaserverfaces commented 15 years ago

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

javaserverfaces commented 15 years ago

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

javaserverfaces commented 15 years ago

driscoll said: Starting.

javaserverfaces commented 15 years ago

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

javaserverfaces commented 15 years ago

driscoll said: Update milestone.

javaserverfaces commented 15 years ago

driscoll said: r=rogerk

Changes applied r7599

javaserverfaces commented 15 years ago

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

javaserverfaces commented 15 years ago

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.

javaserverfaces commented 14 years ago

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

javaserverfaces commented 14 years ago

@edburns said: edburns

javaserverfaces commented 14 years ago

@edburns said: Move these to TBD

javaserverfaces commented 14 years ago

@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

javaserverfaces commented 14 years ago

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

javaserverfaces commented 14 years ago

@edburns said: Fix checked in to HEAD, r8437

javaserverfaces commented 12 years ago

@manfredriem said: Closing resolved issue out

javaserverfaces commented 15 years ago

File: Patch_for_1194.patch Attached By: driscoll

javaserverfaces commented 7 years ago

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

javaserverfaces commented 14 years ago

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