| @@ -43,8 +43,9 @@ | ||
| 43 | 43 | 'clear' => 'both', |
| 44 | 44 | 'z-index' => 9999, |
| 45 | 45 | 'position' => 'relative', |
| 46 | 46 | 'width' => '100%', |
| 47 | + 'max-width' => 'none', | |
| 47 | 48 | 'line-height' => '1.1', |
| 48 | 49 | 'box-sizing' => 'border-box', |
| 49 | 50 | ), |
| 50 | 51 | // 'hover' => '', |
| @@ -167,12 +168,9 @@ | ||
| 167 | 168 | $css = $this->addCSS($normcss, false, 'mb-icon-wrapper', 'normal', $css); |
| 168 | 169 | $css = $this->addCSS('transform', 'translateY(0)', 'mb-icon-wrapper', 'normal', $css); |
| 169 | 170 | $css = $this->addCSS('position', 'absolute', 'mb-icon-wrapper', 'normal', $css); |
| 170 | 171 | |
| 171 | - /* $css['mb-label']['hover']['transform'] = 'translateY(0)'; | |
| 172 | - $css['mb-share-count']['hover']['transform'] = 'translateY(0)'; | |
| 173 | - $css['mb-icon-wrapper']['hover']['transform'] = 'translateY(0)'; | |
| 174 | -*/ | |
| 172 | + | |
| 175 | 173 | $hoverCSS = array( |
| 176 | 174 | // 'display' => 'flex', |
| 177 | 175 | 'align-items' => 'center', |
| 178 | 176 | 'justify-content' => 'center', |
| @@ -187,11 +185,10 @@ | ||
| 187 | 185 | |
| 188 | 186 | |
| 189 | 187 | break; |
| 190 | 188 | case 'hover'; |
| 191 | - /*$color = $css['mb-social']['normal']['background-color']; | |
| 192 | - $css = $this->addCSS('background-color', 'darken(' . $color . ', 20%)', 'mb-social', 'hover', $css); | |
| 193 | -*/ | |
| 189 | + | |
| 190 | + | |
| 194 | 191 | break; |
| 195 | 192 | case 'lift': |
| 196 | 193 | $line_height = intval($args['line_height']) * 1.5; |
| 197 | 194 | |
| @@ -319,8 +316,18 @@ | ||
| 319 | 316 | protected function addStretch($css, $args) |
| 320 | 317 | { |
| 321 | 318 | $css = $this->addCSS('display', 'flex', 'maxsocial', 'normal', $css); |
| 322 | 319 | |
| 320 | + $orientation = (isset($args['orientation'])) ? $args['orientation'] : false; | |
| 321 | + $is_static = (isset($args['is_static'])) ? $args['is_static'] : false; | |
| 322 | + | |
| 323 | + | |
| 324 | + if ($orientation == 'vertical') | |
| 325 | + { | |
| 326 | + $css = $this->addCSS('flex-direction', 'column', 'maxsocial', 'normal', $css); | |
| 327 | + } | |
| 328 | + | |
| 329 | + | |
| 323 | 330 | $css = $this->addCSS('flex', '1.2', 'mb-item', 'hover', $css); |
| 324 | 331 | |
| 325 | 332 | $itemcss = array( |
| 326 | 333 | 'flex' => 1, |
| @@ -330,9 +337,9 @@ | ||
| 330 | 337 | 'transition' => 'all .2s linear', |
| 331 | 338 | ); |
| 332 | 339 | $css = $this->addCSS($itemcss, '','mb-item', 'normal', $css); |
| 333 | 340 | |
| 334 | - $css = $this->addCSS ( array ( | |
| 341 | + $linkcss = array ( | |
| 335 | 342 | 'display' => 'block', |
| 336 | 343 | 'display' => '-webkit-box', |
| 337 | 344 | 'display' => '-webkit-flex', |
| 338 | 345 | 'display' => '-moz-box', |
| @@ -342,12 +349,22 @@ | ||
| 342 | 349 | '-webkit-flex-flow' => 'row wrap', |
| 343 | 350 | '-ms-flex-flow' => 'row wrap', |
| 344 | 351 | 'flex-flow' => 'row wrap', |
| 345 | 352 | 'width' => '100%', |
| 346 | - ), | |
| 353 | + ); | |
| 354 | + | |
| 355 | + // Changing width on horizontal items will mess the size | |
| 356 | + if ( true === $is_static) | |
| 357 | + { | |
| 358 | + unset($linkcss['width']); | |
| 359 | + } | |
| 360 | + | |
| 361 | + | |
| 362 | + $css = $this->addCSS ($linkcss , | |
| 347 | 363 | '', |
| 348 | 364 | 'mb-social', 'normal', $css); |
| 349 | 365 | |
| 366 | + | |
| 350 | 367 | $css = $this->addCSS('flex', '1.2', 'mb-social', 'hover', $css); |
| 351 | 368 | |
| 352 | 369 | // the label |
| 353 | 370 | $css = $this->addCSS ( array ( |
| @@ -631,8 +648,9 @@ | ||
| 631 | 648 | |
| 632 | 649 | $statement = 'inline-block'; |
| 633 | 650 | |
| 634 | 651 | $css = $this->addCSS('display',$statement, $this->items[$i], $pseudo, $css); |
| 652 | + // $css = $this->addCSS('opacity','1', $this->items[$i], $pseudo, $css); | |
| 635 | 653 | unset($hides[$i]); |
| 636 | 654 | break; |
| 637 | 655 | } |
| 638 | 656 | } |
| @@ -646,8 +664,9 @@ | ||
| 646 | 664 | unset($hides[$i]); |
| 647 | 665 | $statement = 'inline-block'; |
| 648 | 666 | |
| 649 | 667 | $css = $this->addCSS('display', $statement, $this->items[$i], $pseudo, $css); |
| 668 | + //$css = $this->addCSS('opacity', '1', $this->items[$i], $pseudo, $css); | |
| 650 | 669 | } |
| 651 | 670 | } |
| 652 | 671 | else { // if display list is just one item. |
| 653 | 672 | $hides = $this->items; |
| @@ -654,14 +673,17 @@ | ||
| 654 | 673 | unset($hides[$item]); |
| 655 | 674 | |
| 656 | 675 | $statement = 'inline-block'; |
| 657 | 676 | |
| 677 | + | |
| 658 | 678 | $css = $this->addCSS('display',$statement,$this->items[$item], $pseudo, $css); |
| 679 | + //$css = $this->addCSS('opacity','1',$this->items[$item], $pseudo, $css); | |
| 659 | 680 | } |
| 660 | 681 | |
| 661 | 682 | foreach($hides as $name => $cname) |
| 662 | 683 | { |
| 663 | 684 | $css = $this->addCSS('display','none', $cname, $pseudo, $css); |
| 685 | + //$css = $this->addCSS('opacity','0', $cname, $pseudo, $css); | |
| 664 | 686 | } |
| 665 | 687 | |
| 666 | 688 | } |
| 667 | 689 | |