about summary refs log tree commit diff stats
path: root/html/elements_test.go
Commit message (Collapse)AuthorAgeLines
* Rename and document fork v1.2.0Alan Pearce33 hours-3/+3
|
* Benchmark large document and run in CI (#246)Markus Wüstenberg2025-03-05-0/+20
| | | Fixes #229
* Add web component elements and slot attribute (#235)Ken Powers2024-10-25-0/+2
| | | | The slot attribute is a standard attribute for use with web components: https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_templates_and_slots
* Move module to maragu.dev/gomponents namespace (#215)Markus Wüstenberg2024-10-03-3/+3
| | | | | | | | | | This is a breaking change to move gomponents to my own import namespace. I will obviously be careful with this, test it out in all kinds of scenarios, release betas, etc. But otherwise, because the `Node` interface is so simple and has basically never changed, I don't think this will break much. 🤞 Fixes #200
* Add `cite` attribute (#192)Yarden Shoham2024-08-19-0/+1
| | | | | | | It can appear in a `<blockquote>`. - Closes https://github.com/maragudk/gomponents/issues/189 Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Add LabelEl (#180)Markus Wüstenberg2024-06-25-0/+1
| | | | | | For consistency with the other name clashes. Also, adjust the readme. I know it's a bit weird to add a pre-deprecated function, but know it's the same as the other functions.
* Deprecate DataAttr, StyleAttr, TitleAttr, FormElMarkus Wüstenberg2024-06-06-113/+120
| | | | | | | | | | | | This change addresses #170 by deprecating some HTML helpers in favor of using one of the styles as a main one, selected based on what I think is the main use case. - For `Data`, it's the attribute. I don't see much use of the `<data>` element in the wild. - For `Style`, it's the attribute. The `style` attribute is everywhere, the `<style>` element is perhaps less so (but not much). This was the hardest one to decide. - For `Title`, it's the attribute. The `<title>` element only shows up once per document. - For `Form`, it's the element. I haven't seen much use of the `data` attribute in the wild. I know this is arguably not a "consistent" approach, but I think it makes for a much nicer API, simply because the most-used option will not be a suffixed version.
* Mark the assert test helpers as such (#90)Markus Wüstenberg2021-10-06-1/+1
| | | | | Using `t.Helper()`. Also move the assert package to be internal.
* Add video element and related attributes (#84)Markus Wüstenberg2021-06-18-0/+1
| | | Adds the `video` element and `loop`, `muted`, `playsinline`, `poster` attributes.
* Streamline HTML element API (#66)Markus Wüstenberg2021-05-05-42/+30
| | | | | There were a lot of elements previously, like `Em`, `H1`, and a lot more, that took a string as the first argument previously. This was weird when you wanted to mix elements to output html like `<strong><em>…</em></strong>` or `<h1>Something <em>something</em> something</h1>`. gomponents is not an HTML validator, so I want people to be able to use elements however they please, also without text content. This also means that all elements now have the same API.
* Return Node from all helpers instead of NodeFunc (#62)Markus Wüstenberg2021-01-07-3/+3
| | | | | This makes it clearer that the helpers return a `Node` of any kind, and that the type is not important. This also streamlines the API, as attribute helpers already return just `Node`.
* Add data- attribute helper (#61)Markus Wüstenberg2020-12-22-1/+1
| | | Fixes #49.
* Simplify available elements (#55)Markus Wüstenberg2020-12-10-55/+9
| | | | | | | `a`, `form`, `img`, `input`, `label`, `option`, `progress`, `select`, and `textarea` are now just regular elements (without helper parameters), because: - Sometimes the use case doesn't fit (`a` as anchor without href, for example) - There's no reason these are special among the others, so streamlining them makes sense Also added new attributes `action`, `alt`, `for`, `method` that I had somehow missed.
* Rename Document to Doctype (#54)Markus Wüstenberg2020-12-10-3/+3
|
* Move elements and attributes into html package (#52)Markus Wüstenberg2020-12-10-0/+212
This makes it easier to use dot-imports. Also updated the readme and examples with new usage, and move the `Classes` helper into the `components` package.