Skip to content

Instantly share code, notes, and snippets.

View MariaJackson1's full-sized avatar

Maria Jackson MariaJackson1

View GitHub Profile
@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 / Remove Author Byline
Created April 20, 2018 03:47
Remove Author Byline
https://generatepress.com/forums/topic/removing-by-from-author-byline/
Add to functions.php
add_filter( 'generate_post_author_output', 'tu_remove_by_byline' );
function tu_remove_by_byline() {
printf( ' <span class="byline">%1$s</span>', // WPCS: XSS ok, sanitization ok.
sprintf( '<span class="author vcard" itemtype="https://schema.org/Person" itemscope="itemscope" itemprop="author"><a class="url fn n" href="%1$s" title="%2$s" rel="author" itemprop="url"><span class="author-name" itemprop="name">%3$s</span></a></span>',
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
/* translators: 1: Author name */
esc_attr( sprintf( __( 'View all posts by %s', 'generatepress' ), get_the_author() ) ),
@MariaJackson1
MariaJackson1 / GeneratePress 3 Column Footer Fix
Created April 20, 2018 23:57
GeneratePress 3 Column Footer Fix
@MariaJackson1
MariaJackson1 / Custom Font @font-face
Last active September 15, 2022 19:59
Custom Fonts @font-face #typography #fonts
https://docs.generatepress.com/article/adding-local-fonts/
https://google-webfonts-helper.herokuapp.com/fonts
/* Local Fonts */
/* oswald-600 - latin */
@font-face {
font-family: 'Oswald';
font-style: normal;
font-weight: 600;
font-display: swap;
@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 / GeneratePress
Last active May 4, 2018 21:01
Include Font Awesome Library
Add to functions.php
//Include Font Awesome Library via their CDN
add_action( 'wp_head', 'tu_font_awesome_css' );
function tu_font_awesome_css() {
echo '<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.9/css/all.css" integrity="sha384-5SOiIsAziJl6AWe0HWRKTXlfcSHKmYV4RBF18PPJ173Kzn7jzMyFuTtk8JA7QQG1" crossorigin="anonymous">';
}
@MariaJackson1
MariaJackson1 / Add Color Overlay to Background Image.txt
Last active August 9, 2022 21:59
Add Color Overlay to Background Image #css
.bg-img {
background: linear-gradient(rgba(232, 66, 244,0.7),rgba(98, 65, 244,0.1)), url(https://picsum.photos/2000/1080/?image=1068);
background-position: center;
background-size: cover;
background-repeat: no-repeat;
height: 100vh;
}
@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;
}
}