This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns space-ui.bem | |
"Add modifiers to CSS classes as in BEM method. | |
See rationale here: http://getbem.com/naming/ | |
For BEM with elements see: https://github.com/druids/ccn | |
Compared to CCN this gist supports maps." | |
(:require [clojure.string :as str])) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns common.typography | |
"Improve quotes and make whitespace non-breaking after 1-2 letter words" | |
(:require [clojure.string :as str])) | |
(def typo-replace-starting-nbsp | |
[#"(^[a-zA-Z\u0400-\u0500]{1,2})\ ", "$1 "]) | |
(assert (= "A being in Australia <a class='yoy'>" | |
(apply str/replace "A being in Australia <a class='yoy'>" typo-replace-starting-nbsp))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns common.match) | |
"Example: | |
(def your-map {:status 200, body 'something} | |
(m {:status 200} your-map) => true | |
" | |
(declare has-matching-values?) | |
OlderNewer