Code Error! Please Someone Help!

Hey how’s it going people,

I’m currently using a builder that allows me to import templates and checks the coding. I run into this error on certain templates and can’t figure out how to fix it. Anyone familiar with it and able to help? The error is in the red bar. " Expected RBRACE"

It’s hard to tell from that screen gif, but is there a semicolon missing on that last line?

Hey @JacksonBates

Yes, it ends with the word monospace. Am I suppose to add it there?

Yeah, each css declaration should have a semicolon at the end.

Hey @JacksonBates

Sorry for the late response but I’ve tried and it didn’t work. Anything else that can be done? I saw something in a forum about applying a li tag with padding but don’t fully understand how. Here’s the full part of the code.

 --blue: #007bff;
  --indigo: #6610f2;
  --purple: #6f42c1;
  --pink: #e83e8c;
  --red: #dc3545;
  --orange: #fd7e14;
  --yellow: #ffc107;
  --green: #28a745;
  --teal: #20c997;
  --cyan: #17a2b8;
  --white: #fff;
  --gray: #6c757d;
  --gray-dark: #343a40;
  --primary: #007bff;
  --secondary: #6c757d;
  --success: #28a745;
  --info: #17a2b8;
  --warning: #ffc107;
  --danger: #dc3545;
  --light: #f8f9fa;
  --dark: #343a40;
  --breakpoint-xs: 0;
  --breakpoint-sm: 576px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 992px;
  --breakpoint-xl: 1200px;
  --font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;


Hmm, I need more information, I think.

You say you’re using a builder that checks coding - judging from the error, the appearance of the editor window and a bit of Googling, I think you might be trying to use CSSLint, is that correct?

Maybe you could describe a little more of:

  1. what you are trying to do
  2. What behaviour you’re expecting
  3. What you’ve already tried to fix it.

From I’m reading about CSSlint issues elsewhere it looks like it sometimes has trouble parsing rules, so it might just be in the way this code looks to the editor (either file extension or type), or it maybe prefers a slightly different syntax to whatever your using.

Presumably, your code does what you expect in a browser and you’re just trying to get a test to pass…is that correct?

I did a little more digging:

It looks like CSSLint doesn’t like CSS4 custom properties yet. :frowning:

You might want to find another linter.