Red dot in assets/base.css after adding code.

Solved

Red dot in assets/base.css after adding code.

Eliuk
Excursionist
14 0 4

Hi, I am so confused, after I added a code (code attached below) for hover effect on button, to "Assets/base.css" there is a red dot (pic attached) is that normal or should I remove the code? Everything was fine before that, The code seems to be working but I am just worried about the red dot appearing on the base.css. I am using dawn theme

 

 

button:hover, .button:hover {
background-color: #yourcolor; /* Change to your desired hover color */
color: #yourtextcolor; /* Change to your desired text color on hover */
transition: background-color 0.3s ease, color 0.3s ease;
}

 

Screenshot 2024-08-14 at 15.21.11.jpg


Accepted Solution (1)
BSS-TekLabs
Shopify Partner
2019 583 687

This is an accepted solution.

Can you delete code in file base.css and add this code to before tag </head> in file theme.liquid

<style>
button:hover, .button:hover {
background-color: #yourcolor; /* Change to your desired hover color */
color: #yourtextcolor; /* Change to your desired text color on hover */
transition: background-color 0.3s ease, color 0.3s ease;
}
</style>

If our suggestions are useful, please let us know by giving it a like or marking it as a solution.


Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)

BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now

View solution in original post

Replies 7 (7)

BSS-TekLabs
Shopify Partner
2019 583 687

Try adding a } after line 3574

If our suggestions are useful, please let us know by giving it a like or marking it as a solution.


Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)

BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now
BSS-TekLabs
Shopify Partner
2019 583 687

BSSTekLabs_0-1723646456594.png

 

Add to here @Eliuk 

 

If our suggestions are useful, please let us know by giving it a like or marking it as a solution.


Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)

BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now
PaulNewton
Shopify Partner
6844 614 1446

To clarify media queries need their own closing brace, that added code either overwrote that, subsumed it, or it could have been missing the whole time and only now did the linter register the issue.

 

When adding new CSS, validate the CSS before and after

https://jigsaw.w3.org/css-validator

 

For any given CSS band-aid solutions try to use a custom-css setting before modifying files code directly.

This can avoid inadvertently breaking your theme or complicating future version upgrades

https://help.shopify.com/en/manual/online-store/themes/theme-structure/extend/add-css 

The custom-css setting does not need the surrounding opening and closing style tags: <style>...</style>


If you must modify files directly always make a back up duplicate of the theme first.

And learn how to rollback eligible files though asset files do not get this feature.

https://help.shopify.com/en/manual/online-store/themes/theme-structure/extend/edit-theme-code#roll-b... 

 

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


Eliuk
Excursionist
14 0 4

Thank you, It didn't help, So I just deleted the code.

 

Is there another way to go about this? I just want the button to change colour on hover.

BSS-TekLabs
Shopify Partner
2019 583 687

This is an accepted solution.

Can you delete code in file base.css and add this code to before tag </head> in file theme.liquid

<style>
button:hover, .button:hover {
background-color: #yourcolor; /* Change to your desired hover color */
color: #yourtextcolor; /* Change to your desired text color on hover */
transition: background-color 0.3s ease, color 0.3s ease;
}
</style>

If our suggestions are useful, please let us know by giving it a like or marking it as a solution.


Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)

BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now
Eliuk
Excursionist
14 0 4

Done. Thank you so much!

PaulNewton
Shopify Partner
6844 614 1446

Put the CSS in a custom-css setting in the theme visual designer per my response above

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org