Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix auto-applied stylesheets bug

  • Loading branch information...
commit 1e439bb90d4d6d7d69040032314453e2eb862f4f 1 parent bc7c94b
@stathissideris authored
Showing with 9 additions and 7 deletions.
  1. +2 −1  .gitignore
  2. +7 −6 src/clarity/component_make.clj
View
3  .gitignore
@@ -3,4 +3,5 @@ pom.xml
lib
classes
.lein-failures
-/autodoc/*
+.lein-deps-sum
+/autodoc/*
View
13 src/clarity/component_make.clj
@@ -1,5 +1,9 @@
(in-ns 'clarity.component)
+(ns clarity.style)
+(defn apply-stylesheet [_ _])
+(in-ns 'clarity.component)
+
;;; this part of the namespace implements the construction and
;;; manipulation of components
@@ -230,16 +234,13 @@
~@(map process-special-setter special-setters)
;;apply default style
- (let [~'style
- (first
- (map util/resolve-value [~''*stylesheet*
- 'clarity/*stylesheet*]))]
+ (let [~'style (util/resolve-value ~''*stylesheet*)]
(when ~'style
- ('clarity.style/apply-stylesheet ~'result ~'style)
+ (clarity.style/apply-stylesheet ~'result ~'style)
(do-component
~'result
(:on-component-added
- ('clarity.style/apply-stylesheet (.getChild ~'event) ~'style)))))
+ (clarity.style/apply-stylesheet (.getChild ~'event) ~'style)))))
~'result)))
Please sign in to comment.
Something went wrong with that request. Please try again.