bhauman / devcards

Devcards aims to provide a visual REPL experience for ClojureScript
1.53k stars 116 forks source link

add support for custom css #153

Closed mariuene closed 5 years ago

mariuene commented 5 years ago

hey. With this you're able to have full freedom of the css, you can choose to overwrite the default css and include your own css.

(ns cool.app
  (:require [devcards.core :as dc]
            [devcards.system :as ds])
  (:require-macros
           [devcards.system :refer [inline-resouce-file]]
           [devcards.core :refer [defcard]]))

(devcards.core/start-devcard-ui! {:css-resouces [ds/devcads-default-code-highlight-css
                                                 ds/devcads-default-css
                                                 ; ds/devcads-default-addons-css
                                                ;  ds/devcads-default-edn-css
                                                 {:id "jeremy-css"
                                                  :css (inline-resouce-file "public/assets/css/devcads.css")}]})

The default is devcards css, then if you provide any css-resources you will overwrite everything. I am open to suggestions if this is the smartest way to do it.

Reasons behind the change is to have more control over the general layout of the devcards.

mariuene commented 5 years ago

I can update the changelog and doc for the change tonight if the feature is okay.