Jump to content

[1.7.*] Help! Can't load custom.css


Recommended Posts

I have version 1.7.1.1

 

I have a child theme:

parent: classic
name: mychildtheme
display_name: A Child Theme
version: 1.0.0
author:
  name: "Myself"
assets:
  # If you're using this theme as child and you want to load
  # the parent theme assets, uncomment this line.
  use_parent_assets: true
  # The following lines are showing how to load assets in your page
  # Uncomment and change value to start loading css or js files
  css:
    all:
      - id: custom-lib-style
        path: assets/css/custom.css

The child's custom.css won't load by default as it should, but instead I get the parent's one!!!

 

And if I register custom.css in theme.yml then I get the parent's file twice!!! For example:

<link rel="stylesheet" href="http://domain.com/shop/themes/classic/assets/css/theme.css" type="text/css" media="all">
[...]
<link rel="stylesheet" href="http://domain.com/shop/themes/classic/assets/css/theme.css" type="text/css" media="all">

How can I load my childs assets??? I can't find documentation about this anywhere and it is frustrating!!!

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
  • 2 months later...
  • 2 years later...
On 8/9/2017 at 5:38 PM, trendingconsulting said:

But child theme is make to not lose change during updgrade. If we use original css file is there a mistake or not?

 

 

 

Hi eveyone!

 

That's why you are adding another additional custom.css. This already exists on /themes/classic/assets/css folder to be used. So you don't need to add it again to your Child Theme at all. Use that instead of a new one.

 

Hope this help you. ;)

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...