Results 1 to 3 of 3

Thread: Global variables in theme

  1. #1
    New user
    Join Date
    08-11-17.
    Posts
    9

    Default Global variables in theme

    Hi,
    I started to test Contao a couple of days ago, trying to understant theming.
    I've imported the official demo (adapted for version 4) and tried to change some color tweacking theme global variables... but no change.
    I've seen that ther is a file named _variables.scss which contains a copy of global variables, and that is NOT updated with theme.
    If I change something directly in that file, the changes appears.
    So... what's the usage of theme global variables ? Is it possible to have _variables.scss updated when theme variables are changed ?

  2. #2
    User Andreas's Avatar
    Join Date
    07-11-09.
    Location
    Mönchengladbach
    Posts
    499

    Default

    Those variables can only be used within the stylesheet BE modul. As you can see there are no CSS files anymore in this module. The demo now uses SCSS files. This stylesheet module for creating so-called "internal" CSS files is some kind of deprecated. You should use your own CSS or SCSS files instead. If you like to use those variables within SCSS I think you have to code it by your own. See DB tl_theme.vars.
    Web-Development, Freelancer, Burgtech, XHTML, HTML5, CSS, PHP, Javascript, MooTools, MySQL and more
    Amazon wishlist

  3. #3
    New user
    Join Date
    08-11-17.
    Posts
    9

    Default

    Thank you, Andreas!
    I've seen, theme variables are useless by now. I will try to have the _variable file updated automatically

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
  •