All Projects → glyphic-co → Textblock

glyphic-co / Textblock

Licence: mit
Continuously responsive typesetting — Demo:

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Textblock

just-responsive-images
WordPress Plugin to support better responsive images with <picture> tag, backgrounds, retina support etc.
Stars: ✭ 47 (-91.23%)
Mutual labels:  responsive, responsive-design
ekzo
💫 Functional Sass framework for rapid and painless development
Stars: ✭ 32 (-94.03%)
Mutual labels:  responsive, typography
responsive type
A one size fits all responsive type solution. Demo: https://codepen.io/kylevilleneuve/pen/XqeVdZ
Stars: ✭ 53 (-90.11%)
Mutual labels:  typography, responsive-design
Argon Dashboard
Argon - Dashboard for Bootstrap 4 by Creative Tim
Stars: ✭ 429 (-19.96%)
Mutual labels:  responsive, responsive-design
FlexBoxFX
FlexBoxFX is a JavaFX implementation of CSS3 flexbox.
Stars: ✭ 65 (-87.87%)
Mutual labels:  responsive, responsive-design
Leerraum.js
A PDF typesetting library with exact positioning and hyphenated line breaking
Stars: ✭ 233 (-56.53%)
Mutual labels:  typesetting, typography
responsivebootstrap
This is the repository for my course, Bootstrap Layouts: Responsive Single-Page Design on LinkedIn Learning and Lynda.com.
Stars: ✭ 49 (-90.86%)
Mutual labels:  responsive, responsive-design
Universal Resume
Minimal and formal résumé (CV) website template for print, mobile, and desktop. https://bit.ly/ur_demo
Stars: ✭ 1,349 (+151.68%)
Mutual labels:  typography, responsive
science-fiction-magazines-blog
Blog template (concept) is inspired by stylish science fiction magazines of the 80-90s.
Stars: ✭ 24 (-95.52%)
Mutual labels:  responsive, responsive-design
breaking-point
BREAKING-POINT lets you quickly define and subscribe to screen (i.e. window) breakpoints in your re-frame application
Stars: ✭ 36 (-93.28%)
Mutual labels:  responsive, responsive-design
React Typesetting
React typesetting components.
Stars: ✭ 80 (-85.07%)
Mutual labels:  typesetting, typography
Layout
Flutter | Create responsive layouts for mobile, web and desktop
Stars: ✭ 312 (-41.79%)
Mutual labels:  responsive, responsive-design
Fluid System
Fluid System is a style props function transformer for generating fluid styles. 💦
Stars: ✭ 130 (-75.75%)
Mutual labels:  typography, fluid
Fluid
Modern, Stylish, Easier and Powerful Css framework for faster and hassle free web development
Stars: ✭ 24 (-95.52%)
Mutual labels:  responsive, fluid
Light Blue Dashboard
🔥 Free and open-source admin dashboard template built with Bootstrap
Stars: ✭ 110 (-79.48%)
Mutual labels:  typography, responsive
pichichi
Simple one page responsive portfolio template
Stars: ✭ 54 (-89.93%)
Mutual labels:  responsive, responsive-design
Google Type
Collaborative typography project using select passages from Aesop's Fables set to Google Fonts
Stars: ✭ 971 (+81.16%)
Mutual labels:  typography, responsive
Sing App
💥Free and open-source admin dashboard template built with Bootstrap 4.5 💥
Stars: ✭ 1,187 (+121.46%)
Mutual labels:  typography, responsive
ionic-login-component
Free sample of Premium Ionic Login Component
Stars: ✭ 17 (-96.83%)
Mutual labels:  responsive, responsive-design
Fitty
✨ Makes text fit perfectly
Stars: ✭ 3,321 (+519.59%)
Mutual labels:  fluid, responsive

Textblock

A javascript tool for adjusting size, leading, and grades to cast continuously responsive typography. It works over your current CSS as a progressive enhancement.

The script calculates your setting based on minimum and maximum values for font size, line height, variable grades, and container width:

  • minimum/maximum font size
  • minimum/maximum line height
  • minimum/maximum container width
  • minimum/maximum grades (variable fonts only)

To initialize, add the element to be resized (required)

With Vanilla JS

  1. Include the main script and
  2. target elements using JS notation:
<script src="textblock.min.js"></script>

<script>
  Textblock([{
    target: ".some-element"
  }]);
</script>

As a Node Module (shown here for React)

  1. Add to modules with npm install --save textblock,
  2. include the module, and
  3. apply to elements within componentDidMount() as needed:
import Textblock from 'textblock';

componentDidMount() {
  Textblock([{
    target: ".some-element"
  }]);
}

Parameters

  • target (required  ): The element that should be resized ".your‑class", "#some-id p"
  • minWidth: default 320
  • maxWidth: default 960
  • minWidth_FontSize: default 1.0
  • maxWidth_FontSize: default 1.8
  • minWidth_LineHeight: default 1.33 (unitless values only)
  • maxWidth_LineHeight: default 1.25 (unitless values only)
  • minWidth_VariableGrade: A variable font weight for the small size, for example 450
  • maxWidth_VariableGrade: A variable font weight for the large size, i.e. 400
  • container: The container width to measure. Defaults to "parent" and can alternately be set to "self".
  • fontSize_Units: default em

For a better sense of context, set your root em to 10px with html { font-size: 62.5%; }. This makes your em units base 10 so 2.4em = 24px. But any number will do because once you start adjusting the min/max numbers, the experience is more visual than calculated. And if you prefer a more scientific approach, Textblock gives you the control you need for setting systems like modular scales.

If you’re using variable fonts, the minWidth_VariableGrade / maxWidth_VariableGrade parameters provide a way to simulate grades (micro-variations in weight to set smaller sizes slightly bolder).

Example Including Extra Parameters

Textblock([{
 target: ".some-class",
 minWidth: 280,
 maxWidth: 800,
 minWidth_FontSize: 1.9,
 maxWidth_FontSize: 2.6,
 minWidth_LineHeight: 1.33,
 maxWidth_LineHeight: 1.25,
 minWidth_VariableGrade: 366,
 maxWidth_VariableGrade: 300,
 container: "self",
 fontSize_Units: "rem"
}]);

Multiple Elements with Different Settings

Textblock([
 {
  target: ".some-class",
  minWidth_FontSize: 1.9,
  maxWidth_FontSize: 2.6
 },
 {
  target: ".another-class",
  minWidth_FontSize: 2.4,
  maxWidth_FontSize: 3.6,
  minWidth_VariableGrade: 450,
  maxWidth_VariableGrade: 400,
  container: "self"
 }
]);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].