| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
################################################################################################### |
|
2
|
|
|
|
|
|
|
# Copyright 2013/2014 by Marcel Greter |
|
3
|
|
|
|
|
|
|
# This file is part of OCBNET-CSS3 (GPL3) |
|
4
|
|
|
|
|
|
|
#################################################################################################### |
|
5
|
|
|
|
|
|
|
package OCBNET::CSS3::Styles::Margin; |
|
6
|
|
|
|
|
|
|
#################################################################################################### |
|
7
|
|
|
|
|
|
|
our $VERSION = '0.2.5'; |
|
8
|
|
|
|
|
|
|
#################################################################################################### |
|
9
|
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
4077
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
33
|
|
|
11
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
27
|
|
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
#################################################################################################### |
|
14
|
|
|
|
|
|
|
# import regular expressions |
|
15
|
|
|
|
|
|
|
#################################################################################################### |
|
16
|
|
|
|
|
|
|
|
|
17
|
1
|
|
|
1
|
|
6
|
use OCBNET::CSS3::Regex::Numbers; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
230
|
|
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
#################################################################################################### |
|
20
|
|
|
|
|
|
|
# register longhand properties for margin |
|
21
|
|
|
|
|
|
|
#################################################################################################### |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
OCBNET::CSS3::Styles::register('margin-top', $re_length, '0'); |
|
24
|
|
|
|
|
|
|
OCBNET::CSS3::Styles::register('margin-left', $re_length, '0'); |
|
25
|
|
|
|
|
|
|
OCBNET::CSS3::Styles::register('margin-right', $re_length, '0'); |
|
26
|
|
|
|
|
|
|
OCBNET::CSS3::Styles::register('margin-bottom', $re_length, '0'); |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
#################################################################################################### |
|
29
|
|
|
|
|
|
|
# register shorthand property for margin |
|
30
|
|
|
|
|
|
|
#################################################################################################### |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
OCBNET::CSS3::Styles::register('margin', |
|
33
|
|
|
|
|
|
|
{ |
|
34
|
|
|
|
|
|
|
'ordered' => |
|
35
|
|
|
|
|
|
|
# needed in order |
|
36
|
|
|
|
|
|
|
[ |
|
37
|
|
|
|
|
|
|
# always needed |
|
38
|
|
|
|
|
|
|
[ 'margin-top' ], |
|
39
|
|
|
|
|
|
|
# additional optional values |
|
40
|
|
|
|
|
|
|
# may evaluate to other value |
|
41
|
|
|
|
|
|
|
[ 'margin-right', 'margin-top'], |
|
42
|
|
|
|
|
|
|
[ 'margin-bottom', 'margin-top'], |
|
43
|
|
|
|
|
|
|
[ 'margin-left', 'margin-right'] |
|
44
|
|
|
|
|
|
|
] |
|
45
|
|
|
|
|
|
|
}); |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
#################################################################################################### |
|
48
|
|
|
|
|
|
|
#################################################################################################### |
|
49
|
|
|
|
|
|
|
1; |