Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shopify If statement in CSS template file?

I'm am editing a Shopify site for a client and I came across this code in the css file.

.pass-foot a {
  font-family: "Myriad Pro", "Gill Sans", "Gill Sans MT", Calibri, sans-serif;
  font-style: italic;
  font-size: 16px;
  font-weight: 600;

  // It's this piece I'm talking about
  **{% if settings.password_bg != "no_password_bg" %}
  color: #fff;
  {% endif %}**
}

I was wondering if anyone has seen anything like this and can explain to me what this if statement is.

like image 971
ajwerth Avatar asked Dec 10 '25 10:12

ajwerth


1 Answers

Looks like {% if %} from Liquid template engine, probably this code is not in a CSS file and is raw on a view file.

You have more information on the documentation here:

https://help.shopify.com/themes/liquid/basics

like image 173
Troyer Avatar answered Dec 12 '25 03:12

Troyer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!