LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code

Display 4 Material Design font-icons using ligatures [instead of CSS names]; each with different sizes and colors

{{ font.name }}
shopping_cart

Cool Tip: Copy an icon and then paste in a text editor to see its textual name!

CSS
.icondemoFontIconsWithLigatures {
  /* Rules for sizing the icon.*/
  /* Rules for using icons as black on a light background.*/
  /* Rules for using icons as white on a dark background.*/ }
  .icondemoFontIconsWithLigatures .appDemoFontIconsWithLigatures {
    padding: 25px;
    width: 100%; }
  .icondemoFontIconsWithLigatures .appDemoFontIconsWithLigatures, .icondemoFontIconsWithLigatures .appDemoFontIconsWithLigatures *:before, .icondemoFontIconsWithLigatures .appDemoFontIconsWithLigatures *:after {
    box-sizing: border-box; }
  .icondemoFontIconsWithLigatures header {
    overflow: hidden; }
  .icondemoFontIconsWithLigatures header h1 {
    color: #888;
    font-size: 36px;
    font-weight: 300; }
  .icondemoFontIconsWithLigatures .container {
    margin: 0 auto;
    max-width: 1200px;
    min-width: 960px;
    padding: 40px 40px;
    font: 14px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif; }
  .icondemoFontIconsWithLigatures .glyph {
    border-bottom: 1px dotted #ccc;
    padding: 10px 0 20px;
    margin-bottom: 20px; }
  .icondemoFontIconsWithLigatures .preview-scale, .icondemoFontIconsWithLigatures .preview-glyphs {
    display: flex;
    flex-direction: row; }
  .icondemoFontIconsWithLigatures .preview-scale {
    color: #888;
    font-size: 12px;
    margin-top: 24px; }
  .icondemoFontIconsWithLigatures .step {
    flex-grow: 1;
    line-height: 0.5; }
  .icondemoFontIconsWithLigatures .usage {
    margin-top: 10px; }
  .icondemoFontIconsWithLigatures .usage input {
    font-family: monospace;
    text-align: center; }
  .icondemoFontIconsWithLigatures .usage .point {
    width: 150px; }
  .icondemoFontIconsWithLigatures .usage .class {
    width: 250px; }
  .icondemoFontIconsWithLigatures .material-icons.md-18 {
    font-size: 18px; }
  .icondemoFontIconsWithLigatures .material-icons.md-24 {
    font-size: 24px; }
  .icondemoFontIconsWithLigatures .material-icons.md-36 {
    font-size: 36px; }
  .icondemoFontIconsWithLigatures .material-icons.md-48 {
    font-size: 48px;
     height: 48px;
  width: 48px;
    color: red;
  }
  .icondemoFontIconsWithLigatures .material-icons.md-dark {
    color: rgba(0, 0, 0, 0.54); }
  .icondemoFontIconsWithLigatures .material-icons.md-dark.md-inactive {
    color: rgba(0, 0, 0, 0.26); }
  .icondemoFontIconsWithLigatures .material-icons.md-light {
    color: white; }
  .icondemoFontIconsWithLigatures .material-icons.md-light.md-inactive {
    color: rgba(255, 255, 255, 0.3); }

JS
document.body.innerHTML = document.body.innerHTML.replace(/{{{amp}}}/g, '&');
angular
  .module('MyApp', ['ngMaterial', 'ngMessages', 'material.svgAssetsCache'])
  .controller('DemoCtrl', function( $scope ) {
      // Specify a list of font-icons with ligatures and color overrides
      var iconData = [
            {name: 'accessibility'  , color: "#777" },
            {name: 'question_answer', color: "rgb(89, 226, 168)" },
            {name: 'backup'         , color: "#A00" },
            {name: 'email'          , color: "#00A" }
          ];

      $scope.fonts = [].concat(iconData);

      // Create a set of sizes...
      $scope.sizes = [
        {size:"md-18",padding:0},
        {size:"md-24",padding:2},
        {size:"md-36",padding:6},
        {size:"md-48",padding:10}
      ];

  });
Term
Sat, 04/14/2018 - 20:44

Related Codes

Pen ID
Pen ID
Pen ID
Square Adv