|
Last change
on this file since 2058e5c was 2058e5c, checked in by istevanoska <ilinastevanoska@…>, 6 months ago |
|
Working / before login
|
-
Property mode
set to
100644
|
|
File size:
681 bytes
|
| Line | |
|---|
| 1 | let Declaration = require('../declaration')
|
|---|
| 2 |
|
|---|
| 3 | class InlineLogical extends Declaration {
|
|---|
| 4 | /**
|
|---|
| 5 | * Return property name by spec
|
|---|
| 6 | */
|
|---|
| 7 | normalize(prop) {
|
|---|
| 8 | return prop.replace(/(margin|padding|border)-(start|end)/, '$1-inline-$2')
|
|---|
| 9 | }
|
|---|
| 10 |
|
|---|
| 11 | /**
|
|---|
| 12 | * Use old syntax for -moz- and -webkit-
|
|---|
| 13 | */
|
|---|
| 14 | prefixed(prop, prefix) {
|
|---|
| 15 | return prefix + prop.replace('-inline', '')
|
|---|
| 16 | }
|
|---|
| 17 | }
|
|---|
| 18 |
|
|---|
| 19 | InlineLogical.names = [
|
|---|
| 20 | 'border-inline-start',
|
|---|
| 21 | 'border-inline-end',
|
|---|
| 22 | 'margin-inline-start',
|
|---|
| 23 | 'margin-inline-end',
|
|---|
| 24 | 'padding-inline-start',
|
|---|
| 25 | 'padding-inline-end',
|
|---|
| 26 | 'border-start',
|
|---|
| 27 | 'border-end',
|
|---|
| 28 | 'margin-start',
|
|---|
| 29 | 'margin-end',
|
|---|
| 30 | 'padding-start',
|
|---|
| 31 | 'padding-end'
|
|---|
| 32 | ]
|
|---|
| 33 |
|
|---|
| 34 | module.exports = InlineLogical
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.