PluginProbe
Social Share Buttons / 0.9
Social Share Buttons v0.9
trunk 0.9 1.0 1.1 1.1.1 1.1.2 1.10 1.11 1.12 1.15 1.16 1.17 1.18 1.19 1.2 1.20 1.3 1.30 1.4 1.5 1.6 1.7 1.8 1.9
share-button / classes / styles / horizontal-style.php

horizontal-style.php in Social Share Buttons 0.9, at classes/styles/horizontal-style.php

143 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace MBSocial;
3 defined('ABSPATH') or die('No direct access permitted');
4
5 class horizontalStyle extends style
6 {
7 public $class = 'horizontal-style';
8 public $name = 'horizontal';
9 public $description = " Horizontal Style ";
10
11 public $has_label = true;
12
13 public function mainCSS()
14 {
15
16 parent::mainCSS();
17 $this->addFlex('maxcollection');
18
19 // flex collection
20 $this->addCSS ( array (
21 'flex' => '1.2'
22 ),
23 '',
24 'collection-item',
25 'hover'
26 );
27
28
29 // flex item
30 $this->addCSS ( array (
31 'flex' => 1,
32 'float' => 'left',
33 'height' => '100%',
34 '-webkit-transition' => 'all .1s linear',
35 'transition' => 'all .1s linear',
36 ),
37 '',
38 'collection-item'
39 );
40
41 $this->addCSS ( array (
42
43 'display' => 'block',
44 'display' => '-webkit-box',
45 'display' => '-webkit-flex',
46 'display' => '-moz-box',
47 'display' => '-ms-flexbox',
48 'display' => 'flex',
49 'text-transform' => 'none',
50 '-webkit-flex-flow' => 'row wrap',
51 '-ms-flex-flow' => 'row wrap',
52 'flex-flow' => 'row wrap',
53 'width' => '100%',
54 ),
55 '',
56 'maxbutton-social');
57
58 $this->addCSS('flex', '1.2', 'maxbutton-social', 'hover');
59
60 // the label
61 $this->addCSS ( array (
62 'text-align' => 'center',
63 'flex-grow' => 3,
64 'margin' => 'auto',
65 'display' => 'none',
66 'opacity' => 0,
67 '-webkit-transition' => 'all .4s linear',
68 'transition' => 'all .4s linear',
69 ),
70 '',
71 'mb-label'
72 );
73
74 // label hover
75 $this->addCSS( array(
76 'display' => 'inline-block',
77 'opacity' => '1',
78
79 ),
80 '',
81 'mb-label',
82 'hover'
83
84 );
85
86 $this->addCSS ( array (
87 'text-align' => 'center',
88 'flex-grow' => 2,
89 'margin' => 'auto',
90 ),
91 '',
92 'mb-icon-wrapper'
93 );
94
95 $this->addCSS ( array (
96 'font-size' => '16px',
97 'margin' => 'auto 0',
98 //'flex-grow' => '1',
99 'display' => 'inline-block',
100 'transform' => 'translateX(-10px)',
101 ),
102 '',
103 'mb-share-count'
104 );
105
106 $this->addCSS('flex-grow', '1', 'mb-share-count', 'hover');
107
108 // $this->addCSS('transform','translateX(-10px)','mb-share-count', 'hover');
109
110
111 } // construct
112
113 public function prepareCSS($args)
114 {
115 parent::prepareCSS($args);
116
117 $default_args = array(
118 'orientation' => 'horizontal',
119 'is_static' => false,
120 );
121
122 $args = wp_parse_args($args, $default_args);
123
124 if ($args['is_static'] == 1)
125 {
126 $this->addCSS(array(
127 'width' => '95%', // not 100% due to margins
128 'height' => 'auto',
129
130 ),
131 '',
132 'maxcollection'
133 );
134
135
136 }
137
138 }
139
140 }
141
142 horizontalStyle::registerStyle(50);
143