0

I have custom theme Hiddentechies/bentriz

enter image description here

theme.js

bentriz: {
    area: 'frontend',
    name: 'Hiddentechies/bentriz',
    locale: 'ja_JP',
    files: [
      'css/source/custom',
      'css/source/extends',
      'css/source/navigation',
      'css/source/theme'
    ],
    dsl: 'less'
}

I run the following command:

grunt exec:bentriz

grunt less:bentriz

grunt watch

http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/css-guide/css_quick_guide_mode.html

There's an error when I run the grunt exec: and grunt less: enter image description here

enter image description here

and when I run grunt watch then modify the _custom.less,nothing happened so I can't see the changes in the theme. Where did I go wrong?

enter image description here

1

Change your code in theme.js file as below:

bentriz: {
        area: 'frontend',
        name: 'Hiddentechies/bentriz',
        locale: 'ja_JP',
        files: [
            'css/styles-m',
            'css/styles-l'
        ],
        dsl: 'less'
 },

And import custom less files in _sources.less file as path below:

app\design\frontend\Hiddentechies\bentriz\web\css\source

@import '_custom.less';

If _sources.less is not exist over above path then copy this file from parent theme or Blank theme and import your custom less files, You do not need to declare this file in theme.js.

Run following command

grunt exec:bentriz    
grunt less:bentriz    
grunt watch
  • Is it related to this when the changes is not reflected on styles-l.css? Because when I run grunt less:bentriz only style-m.css is created. – Dean Jul 28 '17 at 8:46
  • I am talking about Magento default behavior in above post. Then i think there were theme customization, You can check in view source styles-l.css is not removed or may be any other customization. – Dipesh Rangani Jul 28 '17 at 9:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.