Skip to content
Permalink
Browse files

[CSS] grid: auto and percentage are valid arguments for minmax (#1798)

* auto and percentage are valid arguments for minmax
* add repeat() and minmax() completions
  • Loading branch information...
braver authored and wbond committed Dec 21, 2018
1 parent ab032c5 commit 02ad7087bc7de79ef42efa55bb1dee50d2e7749d
Showing with 14 additions and 11 deletions.
  1. +2 −1 CSS/CSS.sublime-syntax
  2. +2 −2 CSS/css_completions.py
  3. +10 −8 CSS/syntax_test_css.css
@@ -1672,7 +1672,8 @@ contexts:
pop: true
- include: comma-delimiter
- include: length-type
- match: \b(max-content|min-content)\b
- include: percentage-type
- match: \b(auto|max-content|min-content)\b
scope: support.constant.property-value.css

# Color Functions
@@ -272,8 +272,8 @@
'grid-gap': ['<length>', '<percentage>'],
'grid-row-gap': ['<length>', '<percentage>'],
'grid-template-areas': [],
'grid-template-columns': ['auto', '<percentage>', '<length>'],
'grid-template-rows': ['auto', '<percentage>', '<length>'],
'grid-template-columns': ['auto', 'repeat($1)', 'minmax($1)', '<percentage>', '<length>'],
'grid-template-rows': ['auto', 'repeat($1)', 'minmax($1)', '<percentage>', '<length>'],
'grid-column': ['<number>'],
'grid-column-end': ['<number>'],
'grid-column-start': ['<number>'],
@@ -912,18 +912,20 @@
/* ^^^^^^ support.function.grid.css */
/* ^^ constant.numeric.css */

top: repeat(auto-fit, 2fr minmax() 5%);
/* ^^^^^^^^ support.keyword.repetitions.css */
/* ^ punctuation.separator.css */
/* ^^^ constant.numeric.css */
/* ^^^^^^ support.function.grid.css */
/* ^^ constant.numeric.css */

top: minmax(min-content, 1fr);
top: repeat(auto-fit, 2fr minmax(auto) 5%);
/* ^^^^^^^^ support.keyword.repetitions.css */
/* ^ punctuation.separator.css */
/* ^^^ constant.numeric.css */
/* ^^^^^^ support.function.grid.css */
/* ^^^^ support.constant.property-value.css */
/* ^^ constant.numeric.css */

top: minmax(min-content, 1fr, 10%);
/* ^^^^^^ support.function.grid.css */
/* ^^^^^^^^^^^ support.constant.property-value.css */
/* ^ punctuation.separator.css */
/* ^^^ constant.numeric.css */
/* ^^^ constant.numeric.css */
grid-template: repeat(2, var(--size)) / repeat(2, 50%);
/* ^^^ support.function.var.css */
/* ^^^^^^ support.type.custom-property.css */

0 comments on commit 02ad708

Please sign in to comment.
You can’t perform that action at this time.