Typesetter Feedback

9 votes
Vote Up

Allow CSS within a page

Follow This IdeaBy Charles S10 years ago9 Comments

In general you cannot add CSS within a page without having invalid markup (due to w3c specifications--all CSS should be in the head). This can be somewhat of a nuisance at times.

Feature idea:

A simple hook for css that could be applied within CKEditor and therefore not stripped. Example: [gp_style] .class {display:inline;} [/gp_style]

It would be combined with the other css on the fly on the server side, of course at the very end to override any other css. Thus the css is stripped from the actual page (everything between the functions) and applied to the css file.

Comments


I support the possibility to allow CSS within pages. But it would be the best, if the CKEditor would be able to load the style.css from the theme with syntax highlightning to edit the CSS file in the Browser. And would load the css classes or id's to style the content.

There is already CSS support in gpEasy. All you have to do is edit the source. For example,


@Webster xhtml does not allow css in any other place than the head. It is invalid markup to have css outside of the head.

So you can't have css in a tag: style="font-family:"comic sans ms";"? I do that all the time - guess I need to validate more often.

@Webster You can have inline styles Example:
You can't have css styles after the closing head tag Example: .test {color:blue;} While the W3C suggests that all styles be in a CSS file inline styling is still allowed. There are times however, when inline styling can't style the item you want to style and having a user add it to the theme css is not alway optimal.


haha. . . OK, looks like my examples were used as code. . . basically, you can't use the style /style tag outside of the head tags = invalid markup. You can use inline--that's what you are using above. . . and caused my text to turn blue above lol

@Webster "There is already CSS support in gpEasy. All you have to do is edit the source. For example," This is not what I meant with "CSS Support" ! I know how to write and use CSS in HTML or PHP Source Code. I meant a support like TinyMCE have included. Tiny loads the style.css inside. And you have an select box (called: Styles) where you can choose your css id's or classes. The same as you would choose in CKEditor a Font-style or the Font-size for your choosen text block. It's a great Thing for lazy users and for Developers and Designers, if they want build Template Themes very quickly. And don't have any Mood to write all time again and again - in the Source code like: >> class="myTextstyle1"

Can imagine to use this for <style ... media="print"/> for single page, but can be indeed easily substituted.

Edited: 9 years agoAdd Comment

New Comment

You must be logged in to comment on an idea.

News

elFinder 2.1.50 in Upcoming Release
12/28/2019

A new release for Typesetter is in the works with a lot of improvements including the ... Read More

Typesetter 5.1
8/12/2017

Typesetter 5.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

More News

creisi productions

Dienstleistungen von creisi productions, Luzern (Schweiz): * Konzeption, Planung und Erstellung Ihres Internet-Auftritts * Betreuung und Aktualisierung/Pflege Ihrer Website * ...

Find out more about our Provider Spotlight

Log In

  Register