New answers tagged

0

I had the same problem, I noticed that the normal CSS was being called on the page and, previously, I enabled the reduction of the size of the CSS, to solve, duplicated the CSS files and removed the ".min" from them: example.min.css example.css leaving the two files in the same folder.


0

This isn't possible out the box using layout XML, the best options seem to be either manually doing so in a template which isn't great, or using a plugin such as https://github.com/meanbee/magento2-csspreload which allows you to do this: <referenceBlock name="head.csspreload"> <arguments> <argument name="assets" xsi:type="array"&...


0

Override this file Magento_Theme/layout/default_head_blocks.xml And add this code <head> <remove src="css/print.css"/> </head>


0

I found the issue, for some reason the js/css was linked to the 'en_GB' store instead of en_US. Because of this the css didn't load, you can change it in the database core_config data, set general/locale/code to the preferred store.


0

Less is a good approach to use in HTML templates. With the help of import variable in less file is easy to change all color of the theme. For the compilation of all less files so that the site can be faster.


-1

its not mandatory, you can add any plain CSS file you want/need. There is a layout file called default_head_blocks.xml You can add as many css files via the css elements as you need <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/...


0

I'd suggest to use the following in local.xml to include CSS: <reference name="head"> <action method="addCss"> <stylesheet>css/customstyle.css</stylesheet> </action> </reference>


0

If I did not get your question wrong. In your child theme, you can always fallback to the extension that you wanna add or override CSS. For example, let's take a look at what is inside of the Paypal module in the Magento Luma: └── web └── css └── source └── module ├── _billing.less ├── _paypal-button....


0

The issue was showing up on 3 category pages. I found that I had "Use Parent Category Settings" set to "on" on those pages. I turned it off, and the issue went away


0

You just need to update the apache2.conf file. /etc/apache2/apache2.conf Navigate to the place in the apache2.conf file.Change "AllowOverride None" to "AllowOverride All" Save the file. Enabled mod_rewrite: sudo a2enmod rewrite sudo service apache2 restart


0

Lets say you want to override styles-m.css, then put the copy in web/css of your theme, name it custom-styles-m.css. Then use this code in your themes default_head_blocks.xml: <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/...


0

Just Follow Below Step :- rm -rf pub/static/frontend/ pub/static/adminhtml/ pub/static/_requirejs pub/static/deployed_version.txt var/cache var/page_cache var/generation var/view_preprocessed var/session generated/code php/bin magento s:up php bin/magento setup:static-content:deploy -f php bin/magento cache:flush After Below Step ...


0

Please Add css in your layout as per below: <?xml version="1.0"?> <page xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <head> <css src="VendorName_ModuleName::css/custom.css" /> </head> Now put your css in below ...


1

*Make sure your layout file is correct way, otherwise not works! Please try below code <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <head> <!-- Here I have tried both methods but no one ...


0

Instead of this file pakke_trackshipment_info.xml you can create default.xml on view/frontend/layout/ so full path app/code/VendorName/ModuleName/view/frontend/layout/default.xml code will be <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration....


0

To add it in to your config.php file is a bit more convoluted than via the database. The database key is dev/css/merge_css_files under core_config_data. You probably have a value for it if you run: MySQL [db]> select * from core_config_data where path like 'dev/%'; which will display all of your dev config settings. The easy way to see exactly what ...


0

I had your same problem and solved it by disabling the server cache. I had the nginx and varnish cache active If you put the site in developer mode do you have the same error?


0

Run this command: bin/magento cache:clean bin/magento setup:static-content:deploy -f And after -f, add lang corresponding with each of your website


0

Your versioning is enabled due to this it is looking like that. So please run the following SQL query for the core_config table. insert into core_config_data (config_id, scope, scope_id, path, value) values (null, 'default', 0, 'dev/static/sign', 0); And run deploy command bin/magento cache:clean bin/magento setup:static-content:deploy -f Give permission ...


Top 50 recent answers are included