Deep-Symmetry / bytefield-svg

Node module that generates byte field diagrams in SVG format
Eclipse Public License 2.0
122 stars 18 forks source link

Box borders should be more flexible #5

Closed brunchboy closed 4 years ago

brunchboy commented 4 years ago

In addition to taking a simple set of keywords, as it currently does, it should also accept a map, in which the border keywords can be assigned individual attr-specs. If the value associated with a border key is simply true or the same keyword as the border (which would be the result of looking it up in a set), a default attr-spec is used (:border-unrelated or :border-related as appropriate). If the value is another keyword, then it is looked up in the attr-spec map. If it is a map, it is used as the border attributes.

brunchboy commented 4 years ago

Actually, the default attr-spec is always :border-unrelated. It’s up to the caller to know if a particular border is “related”.