Questions tagged [less-css]

The tag has no usage guidance, but it has a tag wiki.

Filter by
Sorted by
Tagged with
1
vote
2answers
753 views

Less file changes not taken in production

In prod mode with Magento 2.0.5 Making changes to app\design\frontend\mythemes\2016\web\css\source\_extend.less Then , rm -rf var/cache/* var/view_preprocessed/* pub/static/* php bin/magento setup:...
0
votes
2answers
4k views

style-m.css not found error for custom theme in magento 2

I have created a custom theme that extends Blank theme.This is my default_head_blocks.xml of custom-theme. <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ...
5
votes
2answers
3k views

Magento 2: How to use Grunt properly for CSS changes

I'm trying to figure out the clusterf-ck which is the Magento 2 front-end theming workflow. And I've read and understood all documentation, read all the blogs about it and are up to date on the latest ...
0
votes
2answers
519 views

Magento 2 styling / CSS not displaying in IE 9

For some reason any Less I have written inside the @media-common = true media query does not load in IE9. I can't find any specific code to prevent this from rendering out in IE9. It happens whether ...
2
votes
0answers
71 views

Email.less won't compile

I tried to customize my emails with the _email-extend.less in my theme. But no matter what I try to do at the end Magento only compiles the email-inline.css instead of the email.css. I also tried to ...
2
votes
0answers
463 views

Debugging LESS files with Firebug / Chrome Dev tools Magento 2

I am trying to figure out how to display the LESS file and line number pre compilation in developer tools so that I can see where I need to be editing. I have previously got this up and running with ...
0
votes
1answer
537 views

Identify default variables from less files

I have a custom template with some variables set on _theme.less, it´s working fine. I need to remove "margin-bottom" from class named "sections nav-sections" but I cannot find this variable on ../lib/...
0
votes
1answer
67 views

Override CSS - Magento 2.0.6 (Resolved)

Even tough I can add new custom css files, I'm unable to override the current styles. I have done as described here but my button remains as original color blue: http://devdocs.magento.com/guides/v2....
21
votes
3answers
9k views

Difference between _module.less and _extend.less

Is there any difference between extending a theme using _module.less and _extend.less? And what is the best practice when extending a module/theme? My first thought was it's better to use _module....
2
votes
1answer
132 views

How to properly edit Magento 2 stylesheets? And what to do next to see it in the frontend?

I'm new to Magento 2.0. I purchased a theme and I want to edit some styles. I checked in the firebug it's showing url/pub/static/frontend/vendor_name/theme_name/en_US/css/styles-l.css I made some ...
0
votes
1answer
736 views

Magento 2 : How to set font icon using cdn url

In magento 2, How to set font icon using cdn url. By default font icon comes from theme folder app/design/frontend/{Package}/{theme}/web/css/source/_theme.less file. // Fonts @mobile-cart-padding : ...
9
votes
1answer
3k views

@media-common - Why do we need to use this?

In the Magento 2 lib documentation it contains the following: @media-common: true|false - sets whether to output common styles. For common styles every time you want to add some styles you should use ...
1
vote
1answer
2k views

Less Compilation in Magento 2 [duplicate]

I`m trying to make a new theme and all steps are done: Create theme directory app/design/frontend/MySite/MyTheme Create theme.xml file under app/design/frontend/MySite/MyTheme Add registration.php ...
1
vote
1answer
5k views

How to customize styles from navigation menu in Blank theme?

I've figured out how to change background color in navigation menu by changing values from the navigation UI library (LESS file). Now I want to add top and bottom borders to this menu, how can I ...
0
votes
6answers
2k views

Magento2 : How to change the footer background color in luma-theme?

I am working on magento-2 version with Luma theme. I would like to change the footer background color from #f4f4f4 to my desired color. I found the path is app\design\frontend\Magento\luma\...
2
votes
2answers
1k views

Magento 2 grunt watch is not pre-processing LESS for main locale

My core_config_data table has general/locale/code set to en_IE. When I run grunt exec:<theme-name> and then grunt less:<theme-name>, CSS is generated in two separate locale folders, en_GB ...
2
votes
4answers
5k views

Magento2 - pub static css not found

In developer mode I been getting the error FileError: '/pub/static/frontend/theme/theme_name/en_GB/css/styles-m.css' wasn't found (404) I've taken the following steps to try and resolve this: Used ...
1
vote
2answers
5k views

Where is set the main/primary color value in Luma theme

I'm trying to find out which is the file that sets the main blue color in Luma theme. There is a blue defind @color-blue1: #1979c3; in lib/web/css/source/lib/variables/_colors.less Where Luma gets ...
1
vote
2answers
2k views

how to automatic update file `.less` in custom theme magento2?

In custom theme i have create file custom.less after Flush JavaScript/CSS Cache and Fersesh cache it compiling .less files to CSS. but after i change file custom.less this file not update. i tried ...
3
votes
2answers
6k views

how to fix error after deploy:mode: developer?

In Magento2, after I created custom.less in myTheme, it does not render file less. so I tried run cli php bin/magento deploy:mode:set developer then in the admin panel, I get the error: SyntaxError: ...
2
votes
3answers
2k views

Magento 2 CSS .less files with @variables

I'm having trouble changing the max-width of a theme in Magento 2. I've found the CSS in: <THEME>/web/css/source/_layout.less max-width: @layout__max-width; Then in the Magento Lib folder ...
8
votes
2answers
386 views

Where to place custom UI library

I need to create my own UI library (mostly .less files, but also images and .js) which will be used in multiple custom modules and themes. I thought I will just add my files to Magento UI library ...
6
votes
2answers
3k views

Where to place Magento 2 Theme customizations?

I installed Magento 2 via Composer and it does not have a directory for theme in frontend. I tried to create a new theme in app/design, every time I create registration.php I get an error. Question ...
0
votes
5answers
3k views

compile less files with grunt don t work!errors with EXEC command

After creating my theme I'm trying to compile less files. but I'm having errors when : grunt exec:exercise1. I'm using a windows machine.
3
votes
3answers
5k views

How to update/customize/override Magento 2 css styles

So I followed the Magento 2 Docs to create my theme for the store. Step 1: I have created directories app/design/frontend/<Vendor>/<theme>/ ├── web/ │ ├── css/ │ │ ├── source/ │ ├── ...
16
votes
2answers
5k views

What is the purpose of the LESS lib-css mixin?

The .lib-css() mixin is used heavily in Magento 2 LESS files. However its purpose is not apparent, and the mixin definitions don't provide any helpful documentation: // // Add any css property // --...
1
vote
3answers
2k views

grunt exec command not working in magento2 - Unable to find local grunt

Today I am trying to execute grunt exec:all and grunt exec commands. Unfortunertly it shown me a error. Earlier it was working fine. Later I had try to install new Magento 2 setup. Still the error is ...
7
votes
1answer
970 views

Magento 2 - LESS debuging

I have read Styles debugging guide for M2 and can't seem to find the correct way to start debugging LESS. I have setup Grunt and browser to show original sources for less. But the original source ...
1
vote
2answers
708 views

Magento2 - custom _theme.xml

I tried to change the _theme.xml of a custom theme based on the blank theme like described in this article: http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/css-topics/css-practice.html But ...
7
votes
2answers
2k views

Magento 2. Less to CSS. Very slow building process. How to improve?

Currently magento2/grunt is very slow in transforming less to css (with a few locales it can take up to a minute to rebuild everything. Any tips how to improve development speed?
4
votes
1answer
281 views

Magento 2 1.0.0-beta creating a new vendor/theme from Magento/luma breaks FE

I created a new Vendor/theme where, in the theme.xml, i referenced the Magento/luma theme. As i understand it right, the fallback should now grap styles from the luma theme and my new theme should ...
3
votes
3answers
7k views

Magento 2 grunt exec does not actually create symlinks

I am following: http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/css-topics/css_debug.html#grunt_prereq it says grunt exec:<theme> does: Republishes symlinks to the source files to ...
5
votes
1answer
1k views

Magento 2 - How to change the less variables based on admin configurations?

I'm working with Magento 2 - beta. I want to set the colors and other less variables in the extension's block, controller, or module, eg: @primary__color. Anyone know how to do this? I want to set ...