Skip to content

Commit

Permalink
implement writer for LineWidth
Browse files Browse the repository at this point in the history
  • Loading branch information
keithamus committed Aug 5, 2023
1 parent 4f3cb6a commit 9d0e813
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ means:
("transpiling").
- Provides integration with IDEs (LSP).
- Producing the smallest available artefacts (minification & bundling).
- Provide a way for authors to migrate from alternative authoring formats (such as SCSS).
- Provide a way for authors to migrate from alternative authoring formats (such
as SCSS).

## Roadmap

Expand All @@ -49,7 +50,7 @@ Here is a rough order of operations to get there:
- [ ] [mini.css][11]
- [ ] [openprops][12]
- [ ] [pure][13]
- [ ] [reset (Eric Myer's)][14]
- [x] [reset (Eric Myer's)][14]
- [ ] [tailwind][15]
- [ ] [primer css][16]
- [ ] Benchmarks faster than (or as fast as) comparative parsers
Expand Down Expand Up @@ -83,7 +84,8 @@ Here is a rough order of operations to get there:
- [x] [reset (Eric Myer's)][14]
- [ ] [tailwind][15]
- [ ] [primer css][16]
- [ ] Produces minified CSS smaller than (or as small as) comparative minifiers for
- [ ] Produces minified CSS smaller than (or as small as) comparative
minifiers for
- [x] [960.gs][4]
- [ ] [animate][5]
- [ ] [blueprint][6]
Expand Down
9 changes: 7 additions & 2 deletions crates/hdx_writer/src/css/values/backgrounds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ use hdx_ast::css::values::{backgrounds::*, Shorthand};
use crate::{CssWriter, Result, WriteCss};

impl<'a> WriteCss<'a> for LineWidth {
fn write_css<W: CssWriter>(&self, _sink: &mut W) -> Result {
todo!()
fn write_css<W: CssWriter>(&self, sink: &mut W) -> Result {
match self {
LineWidth::Thin => sink.write_str("thin"),
LineWidth::Medium => sink.write_str("medium"),
LineWidth::Thick => sink.write_str("thick"),
LineWidth::Length(l) => l.write_css(sink),
}
}
}

Expand Down

0 comments on commit 9d0e813

Please sign in to comment.