Project

General

Profile

Actions

Bug #21966

closed

_CSS_DEFAULT_STYLE

Added by Claus Harup over 14 years ago. Updated almost 14 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2010-01-15
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I was just wondering why the following is hardcoded in the source:

public function addCssFile($file, $rel = 'stylesheet', $media = 'screen', $title = '', $compress = TRUE, $forceOnTop = FALSE, $allWrap = '') {
if (!isset($this->cssFiles[$file])) {
$this->cssFiles[$file] = array (
'rel' => $rel,
'media' => $media,
'title' => $title,
'compress' => $compress,
'forceOnTop' => $forceOnTop,
'allWrap' => $allWrap
);
}
}

Everytime I write css through _CSS_DEFAULT_STYLE in my extensions the media is set to screen - I need to set the media to "screen,print" or "all" for my printviews to look nice.

Is the only solution to XCLASS??

(issue imported from #M13252)


Files

0013252_4.4.trunk-rev6808.patch (4.2 KB) 0013252_4.4.trunk-rev6808.patch Administrator Admin, 2010-01-21 22:00
Actions #1

Updated by Ralf Hettinger over 14 years ago

I can confirm this, it has been introduced by #20661 (svn rev 5903; huge commit).

This bug report should imo be set to major (and maybe its title could be a bit more speaking): there is a major change of behaviour introduced by commit 5903 which will break a lot of print views (actually anything other than screen views) relying on CSS after an update to 4.3.

Summary of the change of behaviour: Most CSS styles are now by default only valid for media screen, whereas in TYPO3 4.2 they would've been implicitly valid for all media.
This affects:
- CSS from TYPO3 Core+extensions if TS config.inlineStyle2TempFile is set
- CSS included by TS page.includeCSS and page.stylesheet

There is currently no possible 'undo' of this change if TS config.inlineStyle2TempFile is set.

The attached patch adds the new TS properties as descrbed for page.includeCSS to TS properties page.stylesheet and config.inlineStyle2TempFile and sets the default to media 'all' for the 3 properties.

Actions #2

Updated by Raffi no-lastname-given over 14 years ago

Same problem encountered here - while for custom CSS, it can be solved by overwriting the default "media=screen" with "media=all", this cannot be set for the automatically generated CSS.
The alternative (besides PHP bugfixing) are the header inline styles, which is not something I'd like to implement -> too much source code.

Is this bug planned to be resolved with the next core version?

Actions #3

Updated by Sebastian Mazza about 14 years ago

realy mean bug. I updated a site to 4.3.1 everything looks great, print pages too, but i didn't test printing them...
Thanks to Ralf Hettinger for the patch!

Actions #4

Updated by Christian Clemens about 14 years ago

I can confirm: Since 4.3 e.g. images in print view do not longer flow as they did in 4.2.x., because standard CSS of TYPO3 is limited to screen. There should be a possibility to define media for included standard CSS via TS.

Workaround: I set it it hardcoded in typo3_src-4.3.1/t3lib from "screen" to "screen, print" - but this is no solution. Didn't test the patch, but if it works, it should be integrated in core as soon as possible.

Actions #5

Updated by Steffen Kamper about 14 years ago

Committed to svn,
4_3 rev 6959
trunk rev 6960

Actions

Also available in: Atom PDF