Releases: woylie/doggo
Releases · woylie/doggo
0.14.4
0.14.3
0.14.2
0.14.1
0.14.0
[0.14.0] - 2026-03-16
Changed
- Move
data-numeratoranddata-denominatorattributes inimagecomponent to innerimage-frameelement.
Fixed
- Add modifier data attributes to image component.
HTML diff
Before:
<figure class="image" data-numerator="16" data-denominator="9">
<div class="image-frame">
<img src="" alt="" loading="">
</div>
<figcaption></figcaption>
</figure>
After:
```html
<figure class="image">
<div class="image-frame" data-numerator="16" data-denominator="9">
<img src="" alt="" loading="">
</div>
<figcaption></figcaption>
</figure>0.13.3
0.13.2
0.13.1
0.13.0
This release contains significant breaking changes. Check your component
styles carefully when upgrading.
Added
- Add
:typeoption to modifiers, so that any attribute type can be used
instead of only strings.
Changed
- Rename
mix dog.classestomix dog.safelist. - Rename
Doggo.classes/1toDoggo.safelist/1. - Include data attributes in
mix dog.safelistandDoggo.safelist/1output. - Use
data-attributes instead of classes for modifiers (see upgrade guide
below). button_linkcomponent- Remove
disabled_classoption. - Use
data-disabledattribute instead of thedisabled_class
(selector:[data-disabled]).
- Remove
fieldcomponent- Remove
addon_left_class,addon_right_class, andvisually_hidden_class
options. - Use
data-addonattribute instead ofaddon_left_classand
addon_right_class(selectors:[data-addon~="left"],
[data-addon~="right"]). - Use
data-visually-hiddenattribute instead ofvisually_hidden_class
(selector:[data-visually-hidden]). - Use
data-invalidattribute instead ofhas-errorsclass
(selector:[data-invalid]). - Use
data-stateattribute instead of{base_class}-switch-state-{on|off}
classes (selectors:[data-state="on"],[data-state="off"]).
- Remove
frameandimagecomponent- Make
ratiorequired forframecomponent. - Change format of
ratioattribute (before:16-by-9, after:16:9). - Use
data-numeratoranddata-denominatorattributes instead of adding
a class for the ratio (before:class="is-16-by-9", after:
data-numerator="16" data-denominator="9").
- Make
iconandicon_spritecomponent- Remove
text_position_after_class,text_position_before_class,
text_position_hidden_class, andvisually_hidden_classoptions. - Use
data-text-positionclass instead oftext_position_*classes
(selectors:[data-text-position="before"],
[data-text-position="after"],[data-text-position="hidden"]). - Use
data-visually-hiddenattribute instead ofvisually_hidden_class
(selector:[data-visually-hidden]).
- Remove
stackcomponent- Remove
recursive_classoption. - Use
data-recursiveattribute instead ofrecursive_class
(selector:[data-recursive]).
- Remove
stepscomponent- Remove
current_class,completed_class,upcoming_class, and
visually_hidden_classoptions. - Use
data-visually-hiddenattribute instead ofvisually_hidden_class
(selector:[data-visually-hidden]). - Use
data-stateattribute instead ofcurrent_class,completed_class,
andupcoming_class(selectors:[data-state="current"],
[data-state="completed"],[data-state="upcoming"]).
- Remove
Removed
- Remove
class_name_funoption. - Remove
Doggo.modifier_class_name/2.
Upgrade Guide
In previous versions, modifier attribute values would be reflected with CSS
classes in the HTML output.
For example, if you had a tag component with a size modifier like this:
build_tag(
modifiers: [
size: [values: ["small", "medium", "large"], default: "medium"]
]
)And you used it like:
<.tag size="small">Hello</.tag>This would result in the addition of an is-small class.
<span class="tag is-small">Hello</span>The implementation was changed to use separate data attributes for each modifier
instead. Now, the generated HTML will look like this:
<span class="tag" data-size="small">Hello</span>In your CSS styles, you will need to change the selectors accordingly.
Before:
.tag.is-small {
}After:
.tag[data-size="small"] {
}