PluginProbe
Responsive Menu – Create Mobile-Friendly Menu / 3.0.6
Responsive Menu – Create Mobile-Friendly Menu v3.0.6
4.7.3 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.1.0 4.1.1 4.1.10 4.1.11 4.1.12 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.7 4.1.8 4.1.9 4.2.0 All 90 releases
responsive-menu / src / app / Mappers / ScssButtonMapper.php

ScssButtonMapper.php in Responsive Menu – Create Mobile-Friendly Menu 3.0.6, at src/app/Mappers/ScssButtonMapper.php

64 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace ResponsiveMenu\Mappers;
4
5 class ScssButtonMapper extends ScssMapper
6 {
7
8 public function map()
9 {
10 $hamburger_css_dir = dirname(dirname(dirname(__FILE__))) . '/public/scss/hamburgers/hamburgers.scss';
11 $no_animation = $this->options['button_click_animation'] == 'off' ? '$hamburger-types: ();' : '';
12
13 $css = <<<CSS
14
15 @media screen and ( max-width: {$this->options['breakpoint']}px ) {
16
17 \$hamburger-layer-height: {$this->options['button_line_height']}px;
18 \$hamburger-layer-spacing: {$this->options['button_line_margin']}px;
19 \$hamburger-layer-color: {$this->options['button_line_colour']};
20 \$hamburger-layer-width: {$this->options['button_line_width']}px;
21 \$hamburger-hover-opacity: 1;
22 {$no_animation}
23
24 @import "{$hamburger_css_dir}";
25
26 .responsive-menu-button {
27 width: {$this->options['button_width']}px;
28 height: {$this->options['button_height']}px;
29 @if '{$this->options['button_transparent_background']}' == 'off' {
30 background: {$this->options['button_background_colour']};
31 &:hover {
32 background: {$this->options['button_background_colour_hover']};
33 }
34 }
35 position: {$this->options['button_position_type']};
36 top: {$this->options['button_top']}px;
37 {$this->options['button_left_or_right']}: {$this->options['button_distance_from_side']}%;
38 .responsive-menu-box {
39 color: {$this->options['button_line_colour']};
40 }
41 }
42
43 .responsive-menu-label {
44 color: {$this->options['button_text_colour']};
45 font-size: {$this->options['button_font_size']}px;
46 line-height: {$this->options['button_title_line_height']}px;
47 @if '{$this->options['button_font']}' != '' {
48 font-family: '{$this->options['button_font']}';
49 }
50 }
51
52 #responsive-menu-button {
53 display: inline-block;
54 transition: transform {$this->options['animation_speed']}s, background-color {$this->options['transition_speed']}s;
55 }
56 }
57 CSS;
58
59 return $this->compiler->compile($css);
60
61 }
62
63 }
64