Sublime Forum

Disable css validation

#1

I am checking out the new CSS subgrid which currently only works on Firefox.

The problem I have is that ST3 does not recognize the CSS syntax and therefore does not validate.

How can I get round this problem?

.bottom {
display: grid;
grid-column: 1/9;
.content {
grid-column: 1/5;
}
img {
grid-column: 5/9;
}
}

0 Likes

#2

The snippet provided is no valid CSS as CSS doesn’t support nested selectors.

.bottom {
	display: grid;
	grid-column: 1/9;
}
.content {
	grid-column: 1/5;
}
img {
	grid-column: 5/9;
}

Removing nesting fixes syntax highlighting issues

The screenshot is from ST3.

grafik

1 Like

#3

The nesting is the correct syntax for the new upcoming css subgrid.
The grids will nest inside parent grids. hence the name ‘subgrid’.

subgrid is still in its infancy and only works on Firefox so far.

I wanted to know if there is a way to get ST3 to recognize it without throwing and error.

0 Likes

#4

Subgrid seems to add grid-template-columns: subgrid, not nested selectors. See https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout/Subgrid.

In any case to get nested selectors to work with syntax highlighting you need to make a custom syntax. ST4 adds inheritance which would make things significantly simpler. See https://www.sublimetext.com/docs/syntax.html

0 Likes

#5

thanks. I’ll check both links out.

0 Likes