Shopify Stylesheet - CodeMirror? 99% unused - css

I've got this stylesheet loading on the index, but I can't seem to find the source anywhere. After researching CodeMirror, I'm guessing it has to do with the page customizer?
Is there any way to disable this stylesheet?

This stylesheet is not included in the code of theme.liquid
It's loaded via the {{content_for_header}} in the head section.
It is not coming from an app, as one would suggest,
Its coming from Shopify and is only loaded, when previewing a theme.
It is a little misleading when you are trying to get the page-load down and you are using the developer tools from chrome.
Inspect the theme again after it's live or block the requested URL in dev tools.

If the stylesheet is included in the layout/theme.liquid file, then you can comment out or remove it there.
If it is not included in that file, there is a good chance that it is coming from a Shopify app store app. If that is the case, you would have to check that app for settings, or not use that app.

Related

What is this mystery css that lighthouse is flagging up?

I'm using Chrome's Lighthouse audit to make some performance improvements to a website and there are some styles under the "Remove unused CSS' section that I cannot locate anywhere on the site.
The ones I am questioning are the 2 lines starting html, body etc.
They look a bit like reset styles but aren't the ones I have in the CSS file.
I've tried searching the theme files (this is a shopify site), the page source, turning off javascript and these styles don't show up anywhere.
Has anyone encountered this before?
Since it's a Shopify Site it's using the Shopify style CDN by default. Since it's a CDN the css files are not going to be found in your project directory but rather on Shopify's website. An example of a style CDN can be found here, this one is for bootstrap.It uses a URL to access style options that are stored on their servers so you don't have to download the CSS locally.
Here's more on CDNs.
As for your issue, it looks like your project is referencing these CDNs but you're not using them. If you can find where in your project these CDNs are linked and remove them/comment them out it should resolve the issue.
Here's a similar question about whether or not it's safe to remove unused/deferred styles for Shopify.

Wordpress doesn't apply CSS changes

I was creating a custom template for a wordpress webbsite and for the first time after I add new classes in the style.css and I apply the changes, the website doesn't save them. I tried many times to delete the cache and change browser but nothing. When I open the style sheet from wordpress ACP I can see the changes but from google chrome with the webmaster tool I see nothing, like it shows the old css version. I am using WP Super Cache also.
Anyone knows the solution?
Adding a query killer at the end of the css file might also override any possible caching mechanisms.
Ie: example.com/style.css should be accessed via example.com/style.css?test

Custom CSS WordPress Theme via cPanel (not updating)

I am wondering why I am not unable to make changes; I already tried several things yet, I don't seem to be able to update the CSS, the following I did already:
There is no Editor, so I am unable to make changes via there.
I am an Administrator and have access to cPanel.
I made changes via ../wp-content/theme/my-theme/style.css and no changes were made.
I empty my cache via plugin and hard reload my Chrome, Firefox and Safari. And no changes were made.
Is there any other solutions? I already found the file which contains all the styles. I would try to add my own class, and see if I am to see if there is any effect.
First thing first, From cPanel you can navigate to your website from the fileManager, use it to make code changes and then save them. You need to clear the cache everytime you make changes (i usually do it from the browser (in chrome, open the dev console, then long press on the refresh button and select the bottom one)
If the changes are still not showing on your site, I think that maybe you are editing the wrong CSS? Is this your theme and are you 100% sure you are editing the right file and, for example, it's not overwritten by a child theme or something else?
If you are using any framework, maybe your property is overwritten by your framework (for example, by bootstrap). To check this, open the console or try to add !important in your CSS file.
Just as an example, when I develop a theme I leave the root style.css with only the theme definitions, and then I create different stylesheets in a different folder. This leads me to the next question: are you enqueue your file correctly? is it even loaded by WordPress?
to check this I usually inspect the code in and search for the id of the file I enqueued from my functions.php.
Unfortunately, without more details, this is the only things I could think of when developing and WordPress theme and make changes from cPanel. Hope some of this can actually help.
Please check following options
Permission of file at ../wp-content/theme/my-theme/style.css.
Grab the css and open in Dream-viewer or sublime is there any css syntax issue.
Also the path of style.css in header is show same by view source.
Or
Even you can use the plugins which allow to add custom css without toching the server check this plugin https://wordpress.org/plugins/simple-custom-css/

Prestashop smart cache for css mess up site

When I enable smart cache for css, prestashop frontend will be messed up totally, like only using some of the css.
However, I can see there is all my custom css rules, also blocks and modules in that same file, but I can't understand why it messes it up so bad. Basically its just html dumped together with float effects when I enable it.
It it better to look for other css compiler/minifier and not to use prestashop one? is this general issue ?
Site works perfectly fine after I disable it again...
Using prestashop 1.6.1.6
Any idea how to debug ?
This is not a general issue, this must be happening because of the custom theme that you are using on your store.
You can try removing the theme specific cache from the following directory:
/themes/YOUR_THEME/cache/
You may refer to the following link as well if you have upgraded from 1.6.1.4 to 1.6.1.5 recently.
https://www.prestashop.com/forums/topic/520452-update-from-1614-to-1615/page-2

I can't edit a drupal module, the css location is incredibly difficult to find

I need to edit a css file that manages the position of certain buttons for a block.
Using Google Chrome to inspect the element, Drupal only gives me this information about the css file name: DSFJHjdfkvwvSDFVSFbvnhsdjnvjsdnfjbvw.css
Wonderful... that doesn't exist. How am I suppose to pinpoint the exact location of a css file? I've torn apart the css files within the styles folder in themes.
So basically finding the source code for everything in drupal requires you to find the needle in the haystack. Is there a way to find exactly what css files my webpage is using by using the admin panel??
Drupal, for performance reasons , aggregates all CSS files into one generated file so only 1 request Is needed to load all necessary styles.
You can disable this (not recommended on a prd site) by going to the performance settings in drupal config and disabling js and CSS optimizations.
Clear the cache and now you will see the specific file the CSS rule lives in when inspecting in chrome tools.
As a side note, it is not recommended to edit anything in a contributed module unless you contribute it back. Otherwise, when you need to upgrade to the next version of the module, you will lose your previous changes. I would just apply CSS rules in your custom theme that override the modules CSS.
Sorry if there are typos. This was written on my phone and I will clean it up when I am at my desk.
I think in your drupal configuration you have enabled the "Aggregate and compress CSS files" settings. Try disabling it by going to Configuration > Development > Performance. It might solve you problem.
You can revert back the setting after you have made changes.
Turn of the caching and then clear the cache. You should then get the correct location of the CSS rules. Once you are done with this, enable caching again.

Resources