daily pastebin goal
65%
SHARE
TWEET

Untitled

a guest Aug 10th, 2018 62 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. /* Scoped Style */
  2. @supports (--js-element('html', {}, {})) {
  3.   [--self] {
  4.     background: cyan;
  5.   }
  6. }
  7.  
  8. /* Using an Element Query */
  9. @supports (--js-element('html', {minWidth: 500}, {})) {
  10.   [--self] {
  11.     background: magenta;
  12.   }
  13. }
  14.  
  15. /* Testing a Property with a Function */
  16. @supports (--js-element('html', {offsetWidth: n => n > 700}, {})) {
  17.   [--self] {
  18.     background: yellow;
  19.   }
  20. }
  21.  
  22. /* Using a Custom Function */
  23. @supports (
  24.   --js-element(
  25.     'html',
  26.     {customFunc: 900},
  27.     {customFunc: (tag, n) => tag.offsetWidth > n}
  28.   )
  29. ) {
  30.   [--self] {
  31.     background: black;
  32.   }
  33. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top