Giter VIP home page Giter VIP logo

set-font-size's Introduction

Set font size

Quick and dirty script to set the font size for common elements from the front-end. Originally created to help designers & stake holders easily experiment with different font sizes on different sized screens to see which worked best.

Dependencies

Bootstrap CSS & JS

For styling and easily hiding/displaying the form (I used a collapsible div). Neither one is required for the actual functionality, and if you don't need to style the form elements or hide/show the form, you can ignore them all together.

Set up

For organizational purposes, I've created separate files for the html, style & JS. But when using it, I combine the form, styles & script and add them all inline where needed for ease of use. I'm using this in a development environment, so having inline styles & JS doesn't bother me. Your call as to how you want to handle it.

If keeping the files separate, don't forget to link the stylesheet & script wherever you're using the form - the HTML doesn't include these.

How it works

If using the collapsible form, click/tap on "Adjust font sizes" button to show the form. When you click/tap into an input (say the H1), if there's a H1 tag on the page, the first one will be highlighted. You'll also get a link below the input that will take you to that text so you know what you're working with. If there is no H1 on the page, you'll get a red notice below the input instead. Enter the font size in pixels (but only the number - don't include px) you want to set the element to and hit the Set It button. All H1 tags on the page will now be set to the size you entered.

set-font-size's People

Contributors

chrisjangl avatar

Watchers

 avatar  avatar

Forkers

gurknathe

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.