magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

problem new template

Open Antonioele opened this issue 12 years ago • 5 comments

I used magento 0.1.0-alpha102.I changed the template blank, I added a styles.less, the line @import "source / variables.less" I added the file variables.less I made the changes but do not work. Because '????

Antonioele avatar Nov 08 '14 15:11 Antonioele

Hi @Antonioele , could you give more details?

  1. As I understand you changed file app/design/frontend/Magento/blank/web/css/styles.less in theme "blank". Is it correct?
  2. What's path to variables.less that you created?
  3. What's content of variables.less?
  4. What result do you get (styles.css is not regenerated with new content that includes variables.less?)?
  5. What application mode do you work with? By default it's "default"

buskamuza avatar Nov 09 '14 09:11 buskamuza

the path to variables.less is app/design/Magento/blank/web/css/source/variables.less I changed @color-primary: #fff; @color-primary-dark: darken(@color-primary, 35%); // #000 @color-primary-darker: darken(@color-primary, 13.5%); // #111 @color-primary-lighter: lighten(@color-primary, 29%); // #7d7d7d @color-primary-light: lighten(@color-primary, 45%); // #a6a6a6 @color-secondary: #e8e8e8; @color-secondary-light: lighten(@color-secondary, 5%); @page-bg-color: #fff; @panel-bg: darken(@page-bg-color, 6%); @color-active: #ff5501; @color-error: #e02b27; in style.less @import import "source/variables.less"; how to change mode application ??

Antonioele avatar Nov 09 '14 09:11 Antonioele

@Antonioele , you can change application mode by adding one of the following lines to your root .htaccess file (if you use Apache):

SetEnv MAGE_MODE developer
SetEnv MAGE_MODE production
SetEnv MAGE_MODE default # default behavior, may be skipped

Regarding your issue:

  1. @import import "source/variables.less"; - it's incorrect. Please, change it to @import "source/variables.less";
  2. After the fix remove var/cache, var/view_preprocessed and pub/static/frontend directories.
  3. Open http://your.domain/magento_path/pub/static/frontend/Magento/blank/en_US/css/styles.css
  4. If the fix doesn't help, switch to 'developer' mode - it will make the application to display errors for you.

I tried your example and it looks working - I changed @color-active to '#01f1f1' and it appeared in the generated styles.css.

buskamuza avatar Nov 10 '14 20:11 buskamuza

@Antonioele , one more note - it's not recommended to change core files. Are you just testing LESS implementation in Magento or you really want to change 'blank' theme?

buskamuza avatar Nov 10 '14 20:11 buskamuza

Il 10.11.2014 21:13 Olga ha scritto:

@Antonioele [1] , you can change application mode by adding one of the following lines to your root .htaccess file (if you use Apache):

SetEnv MAGE_MODE developer SetEnv MAGE_MODE production SetEnv MAGE_MODE default # default behavior, may be skipped

Regarding your issue:

  1. @import import "source/variables.less"; - it's incorrect. Please, change it to @import "source/variables.less";
  2. After the fix remove var/cache, var/view_preprocessed and pub/static/frontend directories.
  3. Open http://your.domain/magento_path/pub/static/frontend/Magento/blank/en_US/css/styles.css [2]
  4. If the fix doesn't help, switch to 'developer' mode - it will make the application to display errors for you.

I tried your example and it looks working - I changed @color-active to '#01f1f1' and it appeared in the generated styles.css.

Reply to this email directly or view it on GitHub [3].

thanks olga buskamuza i fixed the problem.

Connetti gratis il mondo con la nuova indoona: hai la chat, le chiamate, le video chiamate e persino le chiamate di gruppo. E chiami gratis anche i numeri fissi e mobili nel mondo! Scarica subito l’app Vai su https://www.indoona.com/

Antonioele avatar Nov 20 '14 16:11 Antonioele