Skip to content

Instantly share code, notes, and snippets.

View cadoo's full-sized avatar
🤔

Cadoo cadoo

🤔
View GitHub Profile
@cadoo
cadoo / title-shadow.css
Created November 10, 2015 12:45
Remove shadow from title
.site-title {
text-shadow: none;
}
@cadoo
cadoo / category-title-remove.php
Last active November 10, 2015 12:42
Remove "Category:" from category titles
add_filter( 'get_the_archive_title', function ( $title ) {
if( is_category() ) {
$title = single_cat_title( '', false );
}
return $title;
@media only screen and (min-width: 62em)
.content-area {
width: 680px;
}
<article id="post-<?php the_ID(); ?>" <?php post_class( 'hentry--masonry' ); ?>>
<div class="entry-wrap">
<a href="<?php echo esc_url( get_permalink() ); ?>">
<div class="entry-image">
<?php if ( has_post_thumbnail() ) : ?>
<?php the_post_thumbnail( 'post-thumb-cropped' ); ?>
<?php else : ?>
<img src="<?php echo get_stylesheet_directory_uri(); ?>/assets/images/post-thumb-cropped.svg" alt="thumbnail">
<?php endif; ?>
</div>
@cadoo
cadoo / _styled_select.scss
Created July 19, 2013 09:36
Styled select
// Styled dropdowns
.styled-select {
width: 100%;
height: em(44);
overflow: hidden;
background: #fff image-url('bg-styled-select-arrow.png') no-repeat 96% 50%;
border: 1px solid #d3d3d3;
select {
background: transparent;
@cadoo
cadoo / px_to_em
Created July 15, 2013 11:12
Size in pixels and convert to ems
@function em($target, $context: 16) {
@return ($target/$context) * 1em;
}
@cadoo
cadoo / breakpoint
Last active December 19, 2015 18:29
Breakpoint mixin breakpoints
// Breakpoint mixin breakpoints
$breakpoint-small: 768px;
$breakpoint-medium: 1004px;
$breakpoint-large: 1230px;
// Responsive helpers
@mixin breakpoint($point) {
@if $point == wide {
@media (min-width: $breakpoint-large) { @content; }
}
@cadoo
cadoo / gist:5008388
Last active December 14, 2015 01:48
Media block
// Media block
@mixin mb($position: left, $spacing:0, $media: '.media', $block: '.block') {
overflow: hidden;
#{unquote($media)} {
float:$position;
@if $spacing > 0 {
margin-#{opposite-position($position)}:$spacing;
}
}
#{unquote($block)} {
@cadoo
cadoo / gist:5008378
Last active December 14, 2015 01:39
Font size in rems, fallback to px
// Font size in rems, fallback to px
@mixin fspxrem($px, $context: 16) {
font-size: $px+px;
font-size: ($px/$context)+rem;
}