Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Nikos Kapatos
Import css inside custom.css
18 febbraio 2009 4.37
Risposta

Nikos Kapatos

Punteggio: Junior Member

Messaggi: 57

Data di Iscrizione: 11 novembre 2008

Messaggi recenti

Hello again

Is there a way to import css files in the custom.css?

I know that the existance of custom.css is to help to have the overides organized and clean but its somekind hard to move between open documents and firebug in order to copy paste the things u need to overide.

So i thought why not to import the already named and grouped css the classic theme has and just make the changes on them.

I created a custom.css in _diffs folder with a subfolder in it with the name customCSS and duplicated all the default css files. I imported em in the custom.css file and started to making changes. Although in the html file (from the viewdesigner plugin) I can c all my changes when i deploy the war its like there r is no css at all.

I've checked the links etc. and everything is ok.

I've typed a rule after the imports for test and it worked (I was just changing the color of the body but it did work) but it keeps ignoring the imports.

Does anyone knows if I have to create a particulare structure for the folders?
Do I have to put a specific order in the imports? (I've imported the css file the same way the main.css imports the defaults).
And finally is it possible or I am trying for no reason? emoticon

Thanx for any help or suggestion.

P.S. If there is already a same post like mine and I didn't c it pls just point me there and I'll read it.
Amos Fong
RE: Import css inside custom.css
18 febbraio 2009 11.15
Risposta

Amos Fong

LIFERAY STAFF

Punteggio: Liferay Legend

Messaggi: 1912

Data di Iscrizione: 7 ottobre 2008

Messaggi recenti

Your import statement should look like:

1@import url(customCSS/file.css);


There was an issue with relative URLs (LPS-1800). What version of Liferay are you running?
Nikos Kapatos
RE: Import css inside custom.css
18 febbraio 2009 23.34
Risposta

Nikos Kapatos

Punteggio: Junior Member

Messaggi: 57

Data di Iscrizione: 11 novembre 2008

Messaggi recenti

Thanx for the reply

I am using 5.2.1 and yes the import statement looks the same like the one u wrote.
Chris Simmons
RE: Import css inside custom.css
3 aprile 2012 23.23
Risposta

Chris Simmons

Punteggio: New Member

Messaggi: 1

Data di Iscrizione: 7 dicembre 2011

Messaggi recenti

Using 6.0.1 -

I'm having the same issue. I've put my CSS imports everywhere thinking maybe it was just a IDE issue but no dice. It is showing some very weird results when I deploy my theme also. Just a quick download of what i'm doing... 4 custom color schemes for my theme. Purpose is so that the user can associated each page with a specific color. I have a small bit of override CSS in the following files (just as the documentation for custom color schemes instructs).
@import url(color_schemes/blue.css);
@import url(color_schemes/purple.css);
@import url(color_schemes/orange.css);
@import url(color_schemes/green.css);


When i deploy, I either get default theme only or for some reason one of the color-scheme files (usually green.css) overrides all others.

I have tried putting the imports and actual CSS right into the _diffs/css/custom.css file, right into the css/custom.css file, I made a _diffs/css/main.css file and even put directly into the css/main. Frustrating. Please assist.
Kravchenko Dmitry
RE: Import css inside custom.css
3 giugno 2013 3.46
Risposta

Kravchenko Dmitry

Punteggio: Regular Member

Messaggi: 139

Data di Iscrizione: 4 ottobre 2010

Messaggi recenti

Have anybody solve the problem?

My CSS imports also just do not work.

The beginning of my `custom.css` file looks following:

@import "compass";

@import url(fonts.css);

@import url(custom_common.css);

@import url(journal-content-article.css);

@import url(color_schemes/green.css);

@import url(color_schemes/orange.css);

Unfortuantely, I see no signs of (for example) `fonts.css` in Chrome Developer tools.
Kravchenko Dmitry
RE: Import css inside custom.css
3 giugno 2013 3.46
Risposta

Kravchenko Dmitry

Punteggio: Regular Member

Messaggi: 139

Data di Iscrizione: 4 ottobre 2010

Messaggi recenti

What is "customCSS" in your code? A folder name or what?
Richard Lee
RE: Import css inside custom.css
19 agosto 2013 9.10
Risposta

Richard Lee

Punteggio: Junior Member

Messaggi: 28

Data di Iscrizione: 18 gennaio 2011

Messaggi recenti

Kravchenko Dmitry:
Have anybody solve the problem?

My CSS imports also just do not work.

The beginning of my `custom.css` file looks following:

@import "compass";

@import url(fonts.css);

@import url(custom_common.css);

@import url(journal-content-article.css);

@import url(color_schemes/green.css);

@import url(color_schemes/orange.css);

Unfortuantely, I see no signs of (for example) `fonts.css` in Chrome Developer tools.


Is color_shemes folder within the _diff/css/ folder or at same level? The above *should* work if color_schemes is within css folder along with custom.css