Skip to content

Instantly share code, notes, and snippets.

View MariaJackson1's full-sized avatar

Maria Jackson MariaJackson1

View GitHub Profile
@MariaJackson1
MariaJackson1 / Highlight Text
Last active August 8, 2022 20:48
Highlight Text
::selection {
color: #fff;
background: #c30dbd;
}
@MariaJackson1
MariaJackson1 / Image Hover Effects
Last active August 8, 2022 20:49
Image Hover Effects
<style>
/*************Advent Calendar 2017 - 6*************/
/******Three Easy to Edit Image Hover Effects******/
/******************By Divi Soup********************/
/******************Divi Theme********************/
/* http://advent2017.divisoupdemos.com/advent-6-three-easy-to-edit-image-hover-effects/ */
/***Effect 1 - Show text on hover***/
@MariaJackson1
MariaJackson1 / Remove Additional CSS Setting in WordPress Customizer
Last active August 8, 2022 20:50
Remove Additional CSS Setting in WordPress Customizer
<?php
add_action( 'customize_register', 'prefix_remove_css_section', 15 );
/**
* Remove the additional CSS section, introduced in 4.7, from the Customizer.
* @param $wp_customize WP_Customize_Manager
*/
function prefix_remove_css_section( $wp_customize ) {
$wp_customize->remove_section( 'custom_css' );
}
@MariaJackson1
MariaJackson1 / Responsive Videos – GeneratePress
Last active August 8, 2022 20:50
Responsive Videos – GeneratePress
We can make our embedded videos responsive by wrapping them in an HTML element, like this:
<div class="videoWrapper">
Your video embed code
</div>
Then, we need to add this CSS:
.videoWrapper {
@MariaJackson1
MariaJackson1 / Call to Action Buttons in Nav
Last active August 8, 2022 20:50
Call to Action Buttons in Nav
https://docs.generatepress.com/article/adding-buttons-navigation/
@MariaJackson1
MariaJackson1 / Anchor Tag
Last active August 8, 2022 20:51
Anchor Tag
Add this to where you want to create an anchor:
<a name="learn-more"></a>
Make a button/link pointing to the anchor:
<a href="#learn-more">Learn More</a>
@MariaJackson1
MariaJackson1 / Font-Smoothing
Last active May 20, 2018 02:20
Font-Smoothing
html {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
@MariaJackson1
MariaJackson1 / Fluid Typography
Last active January 11, 2018 00:12
CSS-Tricks Article
/* --------------- Fluid Typography ------------------
-----per css tricks article: https://css-tricks.com/snippets/css/fluid-typography/ --------------------------------- */
/* ========== Per H1 font, this scales the font-size from a minimum of 29px (at a 320 viewport) to a maximum of 67px (at a 1920px viewport).
==================================================================== */
/* Calculation --------------------------------------------------
font-size: calc(min font size in px + (max font size DO NOT INCLUDE PX - min font size NO PX) * ((100vw - min viewport width px) / (max minus min viewport width no px)));
@MariaJackson1
MariaJackson1 / Background Images
Last active August 8, 2022 20:52
Background Images
@media (max-width: 768px) {
.generate-content-header {
background-size: 100% auto;
}
}
@MariaJackson1
MariaJackson1 / CSS Grid Layout for Modern Browsers
Last active August 8, 2022 20:53
CSS Grid Layout for Modern Browsers
/* ------------------------------------------
Basic one-column layout for all browsers
--------------------------------------------*/
.grid-container {
max-width: 50em;
}
.grid-container > * {
text-align: center;
display: flex;