Skip to content

Instantly share code, notes, and snippets.

View MariaJackson1's full-sized avatar

Maria Jackson MariaJackson1

View GitHub Profile
@MariaJackson1
MariaJackson1 / WordPress Dashboard Widget
Last active August 8, 2022 21:15
WordPress Dashboard Widget
Add to functions.php
add_action('wp_dashboard_setup', 'my_custom_dashboard_widgets');
function my_custom_dashboard_widgets() {
global $wp_meta_boxes;
wp_add_dashboard_widget('custom_help_widget', 'Theme Support', 'custom_dashboard_help');
}
@MariaJackson1
MariaJackson1 / Replace Search Box Text in GeneratePress
Last active August 8, 2022 21:13
Replace Search Box Text GeneratePress
Add to functions.php
add_filter( 'generate_search_placeholder', 'tu_change_search_placeholder' );
function tu_change_search_placeholder() {
return 'Your custom placeholder';
}
@MariaJackson1
MariaJackson1 / Center Elements 1
Last active August 8, 2022 21:12
Center Elements
.🦄 {
display: flex;
align-items: center;
justify-content: center;
}
@MariaJackson1
MariaJackson1 / Box Shadow – Material Design
Last active August 8, 2022 21:11
Box shadow Material Design
.classname {
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
}
@MariaJackson1
MariaJackson1 / Find element causing horizontal scroll
Last active August 8, 2022 21:11
Field element causing horizontal scroll
* {
border: 1px solid red;
}
@MariaJackson1
MariaJackson1 / Target every child except last
Last active August 8, 2022 21:10
Target every child except last child
li:not(:last-child) {
border-bottom: 1px solid;
}
or
li + li {
border-top: 1px solid;
@MariaJackson1
MariaJackson1 / Set size of svg in :before and :after
Last active August 8, 2022 21:09
Set size of SVG in :before and :after
blockquote:before {
content: "";
display:block;
height:225px;
width:225px;
background-size: 225px 225px;
background-image: url(test.svg);
background-repeat: no-repeat;
}
@MariaJackson1
MariaJackson1 / Keyboard Navigation Focus Styles
Last active August 8, 2022 21:07
Keyboard Navigation Focus Styles
:focus {
box-shadow: inset 0 0 0 1px #6c7781;
/* Only visible in Windows High Contrast mode */
outline: 2px solid transparent;
}
@MariaJackson1
MariaJackson1 / transition on load
Last active August 8, 2022 21:06
Transition on Load
@keyframes slideInFromLeft {
0% {
transform: translatey(5%);
opacity: 0;
}
100% {
transform: translatey(0);
opacity: 1;
}
}
@MariaJackson1
MariaJackson1 / Scale image on hover
Last active August 8, 2022 21:05
Scale Image on Hover
.wp-image-909 {
transition: transform 2s;
}
.wp-image-909:hover {
transform: scale(1.05);
}