Skip to content

Commit

Permalink
Contact Form: Update the icon (#10670)
Browse files Browse the repository at this point in the history
Use the new material icon (Ballet https://material.io/tools/icons/?search=ballot&icon=ballot&style=outline) introduced for the contact form block.

<!--- Provide a general summary of your changes in the Title above -->
This PR updated the icons so that it is more constant with the new block builder.
Before:
<img width="951" alt="screen shot 2018-11-19 at 11 14 33 am" src="https://user-images.githubusercontent.com/115071/48729391-55da9e00-ebec-11e8-8451-b8bfe473a6e7.png">

After:
<img width="756" alt="screen_shot_2018-11-19_at_11_08_25_am" src="https://user-images.githubusercontent.com/115071/48729227-f9777e80-ebeb-11e8-8589-a1ace8718317.png">


#### Changes proposed in this Pull Request:
<!--- Explain what functional changes your PR includes -->
None 


#### Testing instructions:
Does the icon look good across different browsers. When you try to edit it. 


#### Proposed changelog entry for your changes:
<!-- Please do not leave this empty. If no changelog entry needed, state as such. -->

*
  • Loading branch information
enejb authored and jeherve committed Nov 21, 2018
1 parent 1ba79b7 commit 3b8be08
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
14 changes: 11 additions & 3 deletions modules/contact-form/css/editor-ui.css
@@ -1,18 +1,26 @@
i.mce-i-grunion {
font-family: dashicons;
font-size: 20px;
}

i.mce-i-grunion:before,
.jetpack-contact-form-icon:before {
content: "\f175";
width: 24px;
vertical-align: top;
content: '';
display: block;
height: 24px;
background-size: 24px;
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="rgb(85, 93, 102)" d="M13 7.5h5v2h-5zm0 7h5v2h-5zM19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM11 6H6v5h5V6zm-1 4H7V7h3v3zm1 3H6v5h5v-5zm-1 4H7v-3h3v3z"/></svg>');
margin-top: -4px;
}
i.mce-i-grunion:before {
margin-top: -2px;
margin-left: -2px;
}

.jetpack-contact-form-icon {
opacity: 0.7;
vertical-align: text-top;
display: inline-block;
height: 18px;
font: 18px/1 dashicons;
}
3 changes: 2 additions & 1 deletion modules/contact-form/grunion-contact-form.php
Expand Up @@ -170,7 +170,8 @@ function __construct() {
'not_found' => __( 'No feedback found', 'jetpack' ),
'not_found_in_trash' => __( 'No feedback found', 'jetpack' ),
),
'menu_icon' => 'dashicons-feedback',
// Matrial Ballot icon
'menu_icon' => 'data:image/svg+xml;base64,' . base64_encode('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M13 7.5h5v2h-5zm0 7h5v2h-5zM19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM11 6H6v5h5V6zm-1 4H7V7h3v3zm1 3H6v5h5v-5zm-1 4H7v-3h3v3z"/></svg>'),
'show_ui' => true,
'show_in_admin_bar' => false,
'public' => false,
Expand Down
8 changes: 0 additions & 8 deletions scss/jetpack-icons.scss
Expand Up @@ -24,11 +24,3 @@ li.toplevel_page_jetpack .wp-menu-image:before {
font-family: 'jetpack' !important;
content: '\f100';
}
#menu-posts-feedback .wp-menu-image:before {
font-family: dashicons !important;
content: '\f175';
}
#adminmenu #menu-posts-feedback div.wp-menu-image {
background: none !important;
background-repeat: no-repeat;
}

0 comments on commit 3b8be08

Please sign in to comment.