Skip to content

Instantly share code, notes, and snippets.

View MariaJackson1's full-sized avatar

Maria Jackson MariaJackson1

View GitHub Profile
@MariaJackson1
MariaJackson1 / Styling Buttons
Last active August 8, 2022 20:53
Styling Buttons
a.btn {
display: inline-block;
color: #fff;
background: #E2243B;
padding: .75em 1.5em;
font-family: sans-serif;
text-transform: uppercase;
font-weight: 200;
font-size: .65rem;
line-height: 1.30;
@MariaJackson1
MariaJackson1 / Line Before and After Heading
Last active August 8, 2022 20:54
Line Before and After Heading
<h1>My heading</h1>
h1 {
text-align: center;
display: grid;
grid-template-columns: 1fr auto 1fr;
grid-gap: 20px;
}
@supports (display: grid) {
@MariaJackson1
MariaJackson1 / Change Cursor
Last active August 8, 2022 20:56
Change Cursor
body {
cursor: pointer;
cursor: url(https://presser.demo.site/wp-content/uploads/2018/02/cursor-hover.svg) 1 1, auto;
}
.cursor:hover {
cursor: pointer;
cursor: url(https://presser.demo.site/wp-content/uploads/2018/02/cursor-active.svg) 1 1, auto;
}
@MariaJackson1
MariaJackson1 / Flexbox – Vertical and Horizontal Centering
Last active August 8, 2022 20:57
Flexbox Vertical and Horizontal Centering
<div class="box">
<div>Dior</div>
</div>
.box {
display: flex;
align-items: center;
justify-content: center;
height: 35em;
}
@MariaJackson1
MariaJackson1 / Buttons GeneratePress Styling Buttons
Last active August 8, 2022 21:17
Styling Buttons GeneratePress
https://generatepress.com/forums/topic/custom-colors-for-buttons/#post-143266
.button,
.button:visited {
display: inline-block;
*display: inline;
*zoom:1;
padding: 10px 15px;
font-size: 17px;
@MariaJackson1
MariaJackson1 / Remove "Month:" Blog Archive Title
Last active August 8, 2022 21:16
Remove "Month:" Blog Archive Title
Add to functions.php
add_filter( 'get_the_archive_title', 'tu_remove_month_archive_title' );
function tu_remove_month_archive_title( $title ) {
if ( is_month() ) {
$title = get_the_date( 'F Y' );
}
return $title;
}
@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);
}