Skip to content

Commit

Permalink
Removed ccssom for now, and fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jaytaph committed Feb 28, 2024
1 parent 66ac4c1 commit d370e9d
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 284 deletions.
198 changes: 0 additions & 198 deletions crates/gosub_css3/src/cssom/cssrule.rs

This file was deleted.

11 changes: 0 additions & 11 deletions crates/gosub_css3/src/cssom/cssrule_list.rs

This file was deleted.

62 changes: 0 additions & 62 deletions crates/gosub_css3/src/cssom/stylesheet.rs

This file was deleted.

11 changes: 0 additions & 11 deletions crates/gosub_css3/src/cssom/stylesheet_list.rs

This file was deleted.

4 changes: 2 additions & 2 deletions crates/gosub_styling/src/css_colors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,15 @@ fn parse_hex(value: &str) -> RgbColor {
}

// 6 hex digits (RRGGBB)
if value.len() == 6 {
if value.len() == 7 {
let r = i32::from_str_radix(&value[1..3], 16).unwrap();
let g = i32::from_str_radix(&value[3..5], 16).unwrap();
let b = i32::from_str_radix(&value[5..7], 16).unwrap();
return RgbColor::new(r as u8, g as u8, b as u8, 255);
}

// 8 hex digits (RRGGBBAA)
if value.len() == 8 {
if value.len() == 9 {
let r = i32::from_str_radix(&value[1..3], 16).unwrap();
let g = i32::from_str_radix(&value[3..5], 16).unwrap();
let b = i32::from_str_radix(&value[5..7], 16).unwrap();
Expand Down

0 comments on commit d370e9d

Please sign in to comment.