Results 1 to 8 of 8

Thread: contao assets and its various css files

  1. #1
    User Carolina's Avatar
    Join Date
    09-05-12.
    Location
    London
    Posts
    99

    Default contao assets and its various css files

    Hi:

    I'm don't want any of the Contao css files in the assets folder. So I switched some off. But there's one, that even after purging the system in maintenance, keeps showing up. It's has this number: 421f99103526. How do I get rid of this? Also, another one showing up in the inspector as user agent stylesheet that I need to delete.

    Thanks!
    Last edited by Carolina; 03/30/2015 at 16:32.
    Carolina

  2. #2
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    339

    Default

    Link to site? Also why do you want to delete those?

    Contao generates CSS files automatically under /assets/css . These CSS files are the combined stylesheets which you defined in your page layout (all internal + all external stylesheets combined into one file). You should not delete those manually and those files will be regenerated after a system maintenance, when you open the front end.

  3. #3
    User Carolina's Avatar
    Join Date
    09-05-12.
    Location
    London
    Posts
    99

    Default extra stylesheets

    It's that I prefer my own styles from scratch, so I know how it's all working, without surprises that override them.

    Also, because Google Webmaster tools is suggesting I do this - sorry I can't find the exact suggestion, but basically reduce the CSS file to one.

    I've already mentioned in another post that for example, the code for Font Awesome is non CSS compliant with lots of errors, according to the CSS validator.

    Here's the website: assembly21.com. If you inspect the logo or the nav (.rwd-nav) you see extra stylesheets.

    Fine I can override defaults, but prefer to write it straight from the beginning with everything in one stylesheet.

    Thanks!
    Carolina

  4. #4
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    339

    Default

    Quote Originally Posted by Carolina View Post
    It's that I prefer my own styles from scratch, so I know how it's all working, without surprises that override them.
    You don't need to delete anything to achieve that. If you don't want to use any stylesheets from the Contao framework, simply do not select them in your page layout.


    Quote Originally Posted by Carolina View Post
    Also, because Google Webmaster tools is suggesting I do this - sorry I can't find the exact suggestion, but basically reduce the CSS file to one.
    But that has nothing to do with deleting any files in the /assets folder. In order to reduce the CSS files to one file, you simply need to select your stylesheets in your page layout under Style sheets - External style sheets, if they are external stylesheets and not internal ones.


    Quote Originally Posted by Carolina View Post
    I've already mentioned in another post that for example, the code for Font Awesome is non CSS compliant with lots of errors, according to the CSS validator.
    That has nothing to do with Contao or how you integrate the stylesheet (and it has nothing to do with deleting any files in the /assets folder).


    Quote Originally Posted by Carolina View Post
    Here's the website: assembly21.com. If you inspect the logo or the nav (.rwd-nav) you see extra stylesheets.
    You have selected the CSS reset under Style sheets - CSS framework in your page layout. If you do not want to use the CSS reset stylesheet, simply disable it in the page layout.

    Furthermore, you also have /css/style-april.css integrated, apparently via Expert settings - Additional <head> tags. You should not do it this way. Move your style-april.css file to the /files directory and then select this stylesheet in your page layout under Style sheets - External style sheets.

  5. #5
    User Carolina's Avatar
    Join Date
    09-05-12.
    Location
    London
    Posts
    99

    Default

    I've found the Google recommendations regarding the extra stylesheet. The Contao ones are all unticked now from whitin the CMS. But I still get a reference there to a Contao CSS file.

    Also there's something about JS and not adding it in the head tag. But where do I add it with Contao?

    Still need to move my CSS file to the folder you suggest. You say "I shouldn't do it in the way I did" in your last paragraph, but why?

    Thanks!
    Attached Images Attached Images
    Last edited by Carolina; 04/13/2015 at 23:02.
    Carolina

  6. #6
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    339

    Default

    Quote Originally Posted by Carolina View Post
    I've found the Google recommendations regarding the extra stylesheet. The Contao ones are all unticked now from whitin the CMS. But I still get a reference there to a Contao CSS file.

    Still need to move my CSS file to the folder you suggest. You say "I shouldn't do it in the way I did" in your last paragraph, but why?
    You are going at it the wrong way. Even if you untick any stylesheet from the Contao framework, Contao's stylesheet system might still automatically integrate and combine other stylesheets, from extensions for example. That's why you shouldn't add your own stylesheet via Addtional <head> tags. Simply integrate your own stylesheet under Style sheets - External style sheets as already said. This way Contao will automatically combine your stylesheet with any other stylesheet that is loaded via Contao.


    Quote Originally Posted by Carolina View Post
    Also there's something about JS and not adding it in the head tag. But where do I add it with Contao?
    This isn't that simple unfortunately. In order to do that conveniently and efficiently, you would need to use an additional extension called Theme+.

  7. #7
    User Carolina's Avatar
    Join Date
    09-05-12.
    Location
    London
    Posts
    99

    Default

    I don't see that extension. Can you check the name? Are there any options? And regarding the CSS, where do I put it in files? Thanks.
    Last edited by Carolina; 04/22/2015 at 11:41.
    Carolina

  8. #8
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    339

    Default

    Quote Originally Posted by Carolina View Post
    I don't see that extension. Can you check the name?
    https://contao.org/en/extension-list...040029.en.html


    Quote Originally Posted by Carolina View Post
    And regarding the CSS, where do I put it in files? Thanks.
    Just anywhere in your files directory. And then simply add your CSS files in the page layout (not via Addtional <head> tags).

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •