Skip to content

Instantly share code, notes, and snippets.

@iamskok
Last active May 24, 2017 02:47
Show Gist options
  • Save iamskok/cad7bc024664d2e4e15d to your computer and use it in GitHub Desktop.
Save iamskok/cad7bc024664d2e4e15d to your computer and use it in GitHub Desktop.
Sassy-validation SassMeister Demo
Sassy-validation {
is-measure: true;
is-measure: false;
is-color: true;
is-color: true;
is-color: false;
is-string: true;
is-string: false;
is-number: true;
is-negative: true;
is-positive: true;
is-positive: false;
is-unit: true;
is-float: true;
is-float: false;
is-integer: true;
is-map: true;
is-empty: true;
is-null: true;
is-list: true;
is-list: false;
}
// ----
// Sass (v3.4.14)
// Compass (v1.0.3)
// Sassy-validation (v0.4.0)
// ----
@import "sassy-validation";
Sassy-validation {
is-measure: val(10px, 'measure');
is-measure: val(10, 'measure');
is-color: val(#eee, 'color');
is-color: val(red, 'color');
is-color: val('sassy-validation', 'color');
is-string: val('Hello world', 'string');
is-string: val(666, 'string');
is-number: val(55, 'number');
is-negative: val(-777, 'negative');
is-positive: val(9, 'positive');
is-positive: val(-19, 'positive');
is-unit: val(rem, 'unit');
is-float: val(9.327538, 'float');
is-float: val(100, 'float');
is-integer: val(44, 'integer');
is-map: val(('x': 1, 'y': 2), 'map');
is-empty: val('', 'empty');
is-null: val(null, 'null');
is-list: val((1, 2, 3, 4), 'list');
is-list: val((1), 'list');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment