All Projects → facjure → Mesh

facjure / Mesh

Licence: epl-1.0
A toolkit for Kinetic Web Typography

Programming Languages

clojure
4091 projects

Projects that are alternatives of or similar to Mesh

Typograph
Класс для автоматического применения правил русской типографики для веб
Stars: ✭ 97 (-41.92%)
Mutual labels:  typography
Pinlayout
Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainable. [iOS/macOS/tvOS/CALayer]
Stars: ✭ 1,870 (+1019.76%)
Mutual labels:  layout-engine
Htmlrenderer
C# HTML Layout and HTML Rendering Engine
Stars: ✭ 143 (-14.37%)
Mutual labels:  layout-engine
Pagebot
Scripted page layout framework for Python.
Stars: ✭ 103 (-38.32%)
Mutual labels:  typography
Ui Ux
📝 Curated list for UI/UX Designers
Stars: ✭ 125 (-25.15%)
Mutual labels:  typography
Grandalf
graph and drawing algorithms framework
Stars: ✭ 135 (-19.16%)
Mutual labels:  layout-engine
Fontanello
Because you have a weak spot for fonts
Stars: ✭ 85 (-49.1%)
Mutual labels:  typography
Harfbuzz
HarfBuzz text shaping engine
Stars: ✭ 2,206 (+1220.96%)
Mutual labels:  typography
Fluid System
Fluid System is a style props function transformer for generating fluid styles. 💦
Stars: ✭ 130 (-22.16%)
Mutual labels:  typography
Typeit
The most versatile JavaScript typewriter effect library on the planet.
Stars: ✭ 2,406 (+1340.72%)
Mutual labels:  typography
Light Blue Dashboard
🔥 Free and open-source admin dashboard template built with Bootstrap
Stars: ✭ 110 (-34.13%)
Mutual labels:  typography
Nehan.js
Latest version -> https://github.com/tategakibunko/nehan
Stars: ✭ 119 (-28.74%)
Mutual labels:  layout-engine
Plusjakartasans
+Jakarta Sans is a open-source fonts. Designed for Jakarta "City of collaboration" program in 2020.
Stars: ✭ 136 (-18.56%)
Mutual labels:  typography
Universal Resume
Minimal and formal résumé (CV) website template for print, mobile, and desktop. https://bit.ly/ur_demo
Stars: ✭ 1,349 (+707.78%)
Mutual labels:  typography
Handwrite
Handwrite generates a custom font based on your handwriting sample.
Stars: ✭ 145 (-13.17%)
Mutual labels:  typography
Flexlayout
FlexLayout adds a nice Swift interface to the highly optimized facebook/yoga flexbox implementation. Concise, intuitive & chainable syntax.
Stars: ✭ 1,342 (+703.59%)
Mutual labels:  layout-engine
Hyphen
Text hyphenation in Javascript.
Stars: ✭ 133 (-20.36%)
Mutual labels:  typography
Muuri React
The layout engine for React
Stars: ✭ 163 (-2.4%)
Mutual labels:  layout-engine
Typesetter
Android tool to help display changes to text positioning.
Stars: ✭ 149 (-10.78%)
Mutual labels:  typography
Gatsby V2 Tutorial Starter
Gatsby V2 Starter - product of step by step tutorial
Stars: ✭ 139 (-16.77%)
Mutual labels:  typography

Mesh

A Responsive Grid & Web Typography toolkit for Clojure & Clojurescript.

Built on Garden.

Rationale

Web Design is 95% Typography - iA

Features

My current priority is to build a Clojurescript interface to CSS Grid, CSS Animations specs in the context of Typography and Graphic Design.

Early research includes expressing:

  • A grid in a single fn
  • Available grids: columnar, container-row-column, fluid-nested-grid, golden-grid
  • Baseline Grid in a single fn
  • Modular Scale in a single fn
  • Viewport Math in a single fn
  • Baseline Typography
  • Typography mixins, and responsive utilities with gardener.
  • Create new DSLs

Quickstart

Early prototypes:

A simple 8-column grid with col-x classes:

(grid/create-minimal-grid ".grid" (px 20))

Fluid, Fractional grids

(def gutter (px 20))

(def grids
   (list (grid/create ".grid" gutter)
         (grid/wrap-widths 978)
         (grid/create-nested-units)
         (grid/nuke-gutters-and-padding)
         (grid/respond-small (:mobile breakpoints) gutter)
         (grid/respond-medium (:tablet breakpoints))))

Nested Grids

Add the following to fluid grids:

(grid/create-nested-units)

Baseline Typpography

(grid/zoomable-baseline-grid 16 24)

Create new DSLs

You may be working with a Creative Director or a Print Designer who does not understand CSS. But they understand Design. Wouldn't it be nice to understand their specs and codify them into data?

Designer: Make the headings serifs and scale-types using four breakpoints (take 480 px increments). And yes, use our brand settings.

(def settings
  {:min-width (px 400)
   :max-width (px 1200)
   :min-font (px 12)
   :max-font (px 32)
   :body-font (:eb-garamond typo/font-families)
   :header-font (:eb-garamond typo/font-families)
   :header-font-weight 600
   :header-color "#111"
   :scale :golden-ratio
   :breakpoints {:mobile (px 480)
                 :tablet (px 960)
                 :laptop (px 1440)
                 :monitor (px 1920)}})

(def fonts {:font-size-base (em 1.5)
            :line-height-base (em 1.45)
            :ff-serif ["EB Garamond" "Serif"]
            :ff-sans ["Fira Sans" "sans-serif"]
            :ff-mono ["Source Code Pro" "monospace"]})
			
(defn headings [declarations]
	[:h1 :h2 :h3 :header declarations])

;; Create your own DSL
(-> headings
    (scale-type settings)
    (make-serifs typo/font-families)))

Functional programmer: "Sure, let me build two higher order functions."

;; a bad example
(defn make-serifs [selector families]
  (fn [declarations]
    (let [styles (selector declarations)]
      (conj styles (font (:garamond families) 3 600 0.5 2)))))

;; slightly better
(defn scale-type [selector params]
  (fn [declarations]
    (let [styles (selector declarations)]
      (conj styles
            (at-media {:min-width (get-in params [:breakpoints :mobile])}
                      [:& {:font-size (* 1.5 (:min-font params))}])
            (at-media {:min-width (get-in params [:breakpoints :tablet])}
                      [:& {:font-size (* 1.75 (:min-font params))}])
            (at-media {:min-width (get-in params [:breakpoints :laptop])}
                      [:& {:font-size (* 2.25 (:min-font params))}])))))

Examples

Examples include example designs with Om and soon Reagent.

Run examples with the current mesh src, using figwheel:

lein dev
  • typography: showcase of all grids with Clj (compile to css)
  • grids: showcase of all grids with Clj (compile to css)

Clojure or Clojurescript?

Styles can be compiled on the server, client, or generated as plain css files.

Write styles in Clojure when you prefer static styles or compiled styles on server. Assuming you’re running lein garden auto with :stylesheet app.styles/index set in its build id, all styles will be compiled into css on disk.

Write styles in Clojurescript when you want styles to be dynamically included at runtime, via Js or Cljs. This is useful if you're building fine-grained components based on React-like libraries: rather than bundling styles into a single file, just import individual styles as functions:

(ns app.styles
  (:require [garden.core :refer [css]]))

(def index
  (css grids)))

(mesh.utils/insert-styles styles/index)

Invoke styles via plain old Javascript:

mesh.dom.insert_styles(app.styles.index)

You don't need complex build tools like Webpack in Clojurescript. Just Convert CSS into data and pass them around as code.

Credits

Joel Holbrooks for creating Garden, Chris Coyler for countless CSS-Tricks.

I learned a lot by studying the source of multiple libraries (see references), and may have borrowed ideas from them. Starting this library would have been much harder without the work of these designers.

References

Contributing

Mesh is currently in the development phase. I will be open to contributions during Alpha.

Status

Development.

Clojars Project

License

Copyright © 2015-2019 Facjure, LLC.

Released under the Eclipse Public License, same as Clojure & Clojurescript.

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].