Giter VIP home page Giter VIP logo

materialize-fixes's Introduction

There's a lot of stuff in Materialize that doesn't quite work right. I've found myself fixing those things repeatedly for different projects. I'm not doing that anymore. (DRY) This repo contains a hosted css file that contains my common fixes for Materialize. Easy to import into a project now and immediately fix many annoyances.

What's included:

• Fix Button's vertical alignment when placed in a Navbar

Out of the box Materialize aligns buttons poorly verticaly. This fix centers them properly.

• Restore missing helper classes

Half of Materialize's documented helper classes don't work. They're just MIA. This fix restores them.

• Fix navbar's height change

Prevents odd size discepancy between mobile and tablet.

• Fix icons in tabs

• Fix paragraph spacing within .card-content

A paragraph needs spacing after it so that two paragraphs don't blend together and look like one. This fixes that.

• Material icons fix

Make Material icons behave in an expected fashion like Font Awesome icons do.

Demo: https://codepen.io/j_holtslander/pen/prEXEa

• iPhone x+ screen fix for materialize

Apple's iPhone X has a "notch" to make space for a camera and other various components. The result is some awkward situations for screen design. This code allows for Materialize to display well on the iPhone X.

Demo: https://css-tricks.com/the-notch-and-css/

• Better affixing of the fixed navbar

Small tweak that will allow for other content to be included with a fixed navbar and be fixed as expected.

Demo: https://codepen.io/j_holtslander/pen/XoPJNv

• Fix .collection-item that has .avatar

If the class .avatar exists with a .collection-item then the min-height for the .collection-item is 84px even if there is only 1-2 lines. This results in extraneous padding on the bottom of the item. By changing the min-height to 64px the .collection-item has proper spacing.

Demo: https://codepen.io/j_holtslander/pen/OrPQJL?editors=1100

• Fix for Materialize's toolbar from FAB

Prevents circular or oval appearance for colored buttons within the expanded toolbar.

Demo: https://codepen.io/j_holtslander/pen/wRqGRv

• Fix materialize's card-images

Better handling of images within cards

Demo: https://codepen.io/j_holtslander/pen/KbXyrq

• Custom nav-center

Self explanatory.

Demo: https://stackoverflow.com/a/42890059/751570

• Materialize's sticky footer

Inclusion of the required css for sticky footer implementation.

Demo: https://materializecss.com/footer.html

• Custom fixed footer for materialize

Similiar to a fixed header but for a fixed footer.

• Custom card title gradients

Gradient overlays for card images that appear underneath card-titles.

Demo: https://codepen.io/j_holtslander/pen/ejZrqG

• Improve card-title to allow for flow-text to be used

Tweak to allow for the usage of flow-text within a card-title

• Add ability to hide card titles

Position a title offscreen to hide it while not removing it. Usually for SEO reasons.

• Full-width collections inside card-content

When a .collection is within a .card on mobile, it should be the full width of the card. This fix makes it so.

• Custom dark sidebar

A dark sidebar option.

Demo: https://codepen.io/j_holtslander/pen/oqGWYJ

• Custom escape container

Utility class for escaping out of an existing container.

• Font awesome icons for materialize

Want to use Font awesome icons within Materialize? Now you can.

Demo: https://codepen.io/j_holtslander/pen/JybxXy

Use in your project

  1. Save the compiled css file into your project and load it within the head of your document. (Recommended)
<link rel="stylesheet" type="text/css" href="css/fixes.css">
  1. Download the Sass version to include in your project's build (Advanced)
  2. Link to it from within the head of your document
<link rel="stylesheet" type="text/css" href="https://jayholtslander.github.io/materialize-fixes/fixes.css">
  1. Import within your stylesheet (Not recommended)
@import url("https://jayholtslander.github.io/materialize-fixes/fixes.css");

Use on Codepen

Screenshot

Imgur

materialize-fixes's People

Contributors

jayholtslander avatar

Stargazers

Geraldo Ribeiro avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.