Skip to content

Need to remove style attribute, if value of style attribute is nil | false #52

Open
@sundaramss

Description

@sundaramss

defstyles function is not eliminate/remove the style attribute, if value of attribute is nil/false.
ex:

(defstyles cell [& {borderColor :border-color :or {borderColor nil}}]
 {
  :width "100%"
  :height "36px"
  :border (when borderColor
                 (str "1px solid " borderColor))})
  • [:div {:class (cell)}]
    output of style is
			
.vars--591108371 {
    --var-sample-app_appcss__cell-0: ;
}

.sample-app_appcss__cell {
    width: 100%;
    height: 36px;
    border: var(--var-sample-app_appcss__cell-0);
}			

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions