0

I want to use a static css to reset my theme css, i cant modify main files because its paid theme and it will be auto reset at time of update.

So I need to add a static css just before (head close) so it could reset all top css.

I know how to add by : default_head_blocks.xml but that is adding css at the top of .

i want to use it like this js example:

 <referenceContainer name="before.body.end">
 <block class="Magento\Framework\View\Element\Js\Components" name="js.beforebody" as="jsbeforebody" template="Magento_Theme::js/js.phtml"/>
 </referenceContainer>
asked Jul 2, 2019 at 14:02

1 Answer 1

0

I deal this case like this: Write your custom CSS in a custom.css -file and load this file normally in the head.

All classes you want to override can be overwritten on this way:

bought.css:

.class {
color: red
}

the !important -element is overwriting an existing definition.

custom.css:

.class {
color: blue !important;
}

or

body div.class {
color: blue;
}

The more specific you call the css the higher the chance to overwrite.

answered Nov 12, 2019 at 21:43

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.