Skip to content

Commit

Permalink
Supports: Adding CSS feature support detection architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
Garneauma committed Jul 6, 2023
1 parent 36468cf commit ce8979e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ module.exports = (grunt) ->
[
"clean:dist"
"sass:all"
"concat:supports"
"concat:plugins"
"copy:assets"
"copy:fonts"
Expand Down Expand Up @@ -507,6 +508,14 @@ module.exports = (grunt) ->
separator: ","
src: "sites/**/index.json-ld"
dest: "_data/sites.json"
supports:
options:
stripBanners: false
src: [
"<%= themeDist %>/css/theme.css"
"sites/supports/*.css"
]
dest: "<%= themeDist %>/css/theme.css"

# Placeholder modal for multimélo task
mélimélo:
Expand Down
13 changes: 13 additions & 0 deletions sites/supports/_supporthas.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* GCWeb :has() feature support detection
*/

:root {
--supports-has: false;
}

@supports selector(:has(*)) {
:root {
--supports-has: true;
}
}

0 comments on commit ce8979e

Please sign in to comment.