Skip to content

Instantly share code, notes, and snippets.

View TimothyMwangi's full-sized avatar

Tim Kyarie TimothyMwangi

  • Infinitim
  • Nairobi
View GitHub Profile
@TimothyMwangi
TimothyMwangi / 18-simple-styles-for-horizontal-rules-hr-css-design.markdown
Created March 6, 2018 14:39
18 Simple Styles for Horizontal Rules (hr CSS Design)
@TimothyMwangi
TimothyMwangi / bootstrap-3-nav-menu-responsive-brand-logo-image-dispute-bills.markdown
Created February 27, 2017 16:17
Bootstrap 3 Nav Menu Responsive Brand Logo Image - Dispute Bills

Bootstrap 3 Nav Menu Responsive Brand Logo Image - Dispute Bills

This demo corresponds to a this question answered on stackoverflow about Bootstrap Navbar Logos

There is a bug in Firefox with the bootstrap navbar-brand image. These methods above FIX the firefox issue by applying padding to the image and not the .navbar-brand tag removing the padding on .navbar-brand.

If you're looking for my original post using object fit method I have removed it for now because it is not fully supported in IE without a polyfill or fallback using css tables.

These are all examples of how to use a logo image in the bootstrap nav using tag. Using height on the logo along with width: auto, the image will resize to fit within the navbar and not overflow onto the page. This works exactly the same way .img-responsive does except in reverse. However, there is currently a bug in firefox so we have

<!-- START OF THE FLEX CONTAINER, THE UNORDERED LIST -->
<ul class="grid-wrap">
<!-- WP LOOP STARTS HERE -->
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<!-- LIST ITEM FOR EACH POST -->
<li class="grid-item">
<!-- FEATURED IMAGE FOR THE POST -->
@TimothyMwangi
TimothyMwangi / bb8-from-starwars-with-svg-gsap.markdown
Created February 6, 2017 09:13
BB8 from Starwars ⚾️ – with SVG & GSAP

BB8 from Starwars ⚾️ – with SVG & GSAP

Droids 🤖

I'm not a blockbuster kind of guy, but I just can't resist when it comes to Starwars. It's such a captivating saga. The divine Force that connects us all, the inner battle against evil, and of course the little companion droids. BB8 is such a well designed character. While recognising some reused features from R2D2's lovable personality, we also so see a reinvented droid with his own quirky style and functionality.

Making a BB8 graphic (SVG) and bringing him to life (GSAP) was my way of getting some quality time and getting to know the little guy.

@TimothyMwangi
TimothyMwangi / -webkit-background-clip:text CSS effect .markdown
Created June 8, 2016 00:02
-webkit-background-clip:text CSS effect
@TimothyMwangi
TimothyMwangi / -webkit-background-clip:text CSS effect .markdown
Last active May 23, 2016 16:42
-webkit-background-clip:text CSS effect