main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
633 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | Object.defineProperty(exports, "__esModule", {
|
---|
4 | value: true
|
---|
5 | });
|
---|
6 | exports.default = sizing;
|
---|
7 | var prefixes = ['-webkit-', '-moz-', ''];
|
---|
8 |
|
---|
9 | var properties = {
|
---|
10 | maxHeight: true,
|
---|
11 | maxWidth: true,
|
---|
12 | width: true,
|
---|
13 | height: true,
|
---|
14 | columnWidth: true,
|
---|
15 | minWidth: true,
|
---|
16 | minHeight: true
|
---|
17 | };
|
---|
18 | var values = {
|
---|
19 | 'min-content': true,
|
---|
20 | 'max-content': true,
|
---|
21 | 'fill-available': true,
|
---|
22 | 'fit-content': true,
|
---|
23 | 'contain-floats': true
|
---|
24 | };
|
---|
25 |
|
---|
26 | function sizing(property, value) {
|
---|
27 | if (properties.hasOwnProperty(property) && values.hasOwnProperty(value)) {
|
---|
28 | return prefixes.map(function (prefix) {
|
---|
29 | return prefix + value;
|
---|
30 | });
|
---|
31 | }
|
---|
32 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.