style_attributes.rs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827
  1. /*
  2. - [ ] pub display: Display,
  3. - [x] pub position_type: PositionType, --> kinda, taffy doesnt support everything
  4. - [ ] pub direction: Direction,
  5. - [x] pub flex_direction: FlexDirection,
  6. - [x] pub flex_wrap: FlexWrap,
  7. - [x] pub flex_grow: f32,
  8. - [x] pub flex_shrink: f32,
  9. - [x] pub flex_basis: Dimension,
  10. - [x] pub overflow: Overflow, ---> kinda implemented... taffy doesnt have support for directional overflow
  11. - [x] pub align_items: AlignItems,
  12. - [x] pub align_self: AlignSelf,
  13. - [x] pub align_content: AlignContent,
  14. - [x] pub margin: Rect<Dimension>,
  15. - [x] pub padding: Rect<Dimension>,
  16. - [x] pub justify_content: JustifyContent,
  17. - [ ] pub position: Rect<Dimension>,
  18. - [x] pub border: Rect<Dimension>,
  19. - [ ] pub size: Size<Dimension>, ----> ??? seems to only be relevant for input?
  20. - [ ] pub min_size: Size<Dimension>,
  21. - [ ] pub max_size: Size<Dimension>,
  22. - [ ] pub aspect_ratio: Number,
  23. */
  24. use dioxus_native_core::{
  25. layout_attributes::parse_value,
  26. node::OwnedAttributeView,
  27. node_ref::{AttributeMaskBuilder, NodeMaskBuilder, NodeView},
  28. prelude::*,
  29. };
  30. use dioxus_native_core_macro::partial_derive_state;
  31. use shipyard::Component;
  32. use taffy::prelude::*;
  33. use crate::style::{RinkColor, RinkStyle};
  34. #[derive(Default, Clone, PartialEq, Debug, Component)]
  35. pub struct StyleModifier {
  36. pub core: RinkStyle,
  37. pub modifier: TuiModifier,
  38. }
  39. #[partial_derive_state]
  40. impl State for StyleModifier {
  41. type ParentDependencies = (Self,);
  42. type ChildDependencies = ();
  43. type NodeDependencies = ();
  44. // todo: seperate each attribute into it's own class
  45. const NODE_MASK: NodeMaskBuilder<'static> = NodeMaskBuilder::new()
  46. .with_attrs(AttributeMaskBuilder::Some(SORTED_STYLE_ATTRS))
  47. .with_element();
  48. fn update<'a>(
  49. &mut self,
  50. node_view: NodeView,
  51. _: <Self::NodeDependencies as Dependancy>::ElementBorrowed<'a>,
  52. parent: Option<<Self::ParentDependencies as Dependancy>::ElementBorrowed<'a>>,
  53. _: Vec<<Self::ChildDependencies as Dependancy>::ElementBorrowed<'a>>,
  54. _: &SendAnyMap,
  55. ) -> bool {
  56. let mut new = StyleModifier::default();
  57. if parent.is_some() {
  58. new.core.fg = None;
  59. }
  60. // handle text modifier elements
  61. if node_view.namespace().is_none() {
  62. if let Some(tag) = node_view.tag() {
  63. match tag {
  64. "b" => apply_style_attributes("font-weight", "bold", &mut new),
  65. "strong" => apply_style_attributes("font-weight", "bold", &mut new),
  66. "u" => apply_style_attributes("text-decoration", "underline", &mut new),
  67. "ins" => apply_style_attributes("text-decoration", "underline", &mut new),
  68. "del" => apply_style_attributes("text-decoration", "line-through", &mut new),
  69. "i" => apply_style_attributes("font-style", "italic", &mut new),
  70. "em" => apply_style_attributes("font-style", "italic", &mut new),
  71. "mark" => {
  72. apply_style_attributes("background-color", "rgba(241, 231, 64, 50%)", self)
  73. }
  74. _ => (),
  75. }
  76. }
  77. }
  78. // gather up all the styles from the attribute list
  79. if let Some(attrs) = node_view.attributes() {
  80. for OwnedAttributeView {
  81. attribute, value, ..
  82. } in attrs
  83. {
  84. if let Some(text) = value.as_text() {
  85. apply_style_attributes(&attribute.name, text, &mut new);
  86. }
  87. }
  88. }
  89. // keep the text styling from the parent element
  90. if let Some((parent,)) = parent {
  91. let mut new_style = new.core.merge(parent.core);
  92. new_style.bg = new.core.bg;
  93. new.core = new_style;
  94. }
  95. if &mut new != self {
  96. *self = new;
  97. true
  98. } else {
  99. false
  100. }
  101. }
  102. fn create<'a>(
  103. node_view: NodeView<()>,
  104. node: <Self::NodeDependencies as Dependancy>::ElementBorrowed<'a>,
  105. parent: Option<<Self::ParentDependencies as Dependancy>::ElementBorrowed<'a>>,
  106. children: Vec<<Self::ChildDependencies as Dependancy>::ElementBorrowed<'a>>,
  107. context: &SendAnyMap,
  108. ) -> Self {
  109. let mut myself = Self::default();
  110. myself.update(node_view, node, parent, children, context);
  111. myself
  112. }
  113. }
  114. #[derive(Default, Clone, PartialEq, Debug)]
  115. pub struct TuiModifier {
  116. pub borders: Borders,
  117. }
  118. #[derive(Default, Clone, PartialEq, Debug)]
  119. pub struct Borders {
  120. pub top: BorderEdge,
  121. pub right: BorderEdge,
  122. pub bottom: BorderEdge,
  123. pub left: BorderEdge,
  124. }
  125. impl Borders {
  126. fn slice(&mut self) -> [&mut BorderEdge; 4] {
  127. [
  128. &mut self.top,
  129. &mut self.right,
  130. &mut self.bottom,
  131. &mut self.left,
  132. ]
  133. }
  134. }
  135. #[derive(Clone, PartialEq, Debug)]
  136. pub struct BorderEdge {
  137. pub color: Option<RinkColor>,
  138. pub style: BorderStyle,
  139. pub width: Dimension,
  140. pub radius: Dimension,
  141. }
  142. impl Default for BorderEdge {
  143. fn default() -> Self {
  144. Self {
  145. color: None,
  146. style: BorderStyle::None,
  147. width: Dimension::Points(0.0),
  148. radius: Dimension::Points(0.0),
  149. }
  150. }
  151. }
  152. #[derive(Clone, Copy, PartialEq, Eq, Debug)]
  153. pub enum BorderStyle {
  154. Dotted,
  155. Dashed,
  156. Solid,
  157. Double,
  158. Groove,
  159. Ridge,
  160. Inset,
  161. Outset,
  162. Hidden,
  163. None,
  164. }
  165. impl BorderStyle {
  166. pub fn symbol_set(&self) -> Option<ratatui::symbols::line::Set> {
  167. use ratatui::symbols::line::*;
  168. const DASHED: Set = Set {
  169. horizontal: "╌",
  170. vertical: "╎",
  171. ..NORMAL
  172. };
  173. const DOTTED: Set = Set {
  174. horizontal: "┈",
  175. vertical: "┊",
  176. ..NORMAL
  177. };
  178. match self {
  179. BorderStyle::Dotted => Some(DOTTED),
  180. BorderStyle::Dashed => Some(DASHED),
  181. BorderStyle::Solid => Some(NORMAL),
  182. BorderStyle::Double => Some(DOUBLE),
  183. BorderStyle::Groove => Some(NORMAL),
  184. BorderStyle::Ridge => Some(NORMAL),
  185. BorderStyle::Inset => Some(NORMAL),
  186. BorderStyle::Outset => Some(NORMAL),
  187. BorderStyle::Hidden => None,
  188. BorderStyle::None => None,
  189. }
  190. }
  191. }
  192. /// applies the entire html namespace defined in dioxus-html
  193. pub fn apply_style_attributes(
  194. //
  195. name: &str,
  196. value: &str,
  197. style: &mut StyleModifier,
  198. ) {
  199. match name {
  200. "animation"
  201. | "animation-delay"
  202. | "animation-direction"
  203. | "animation-duration"
  204. | "animation-fill-mode"
  205. | "animation-iteration-count"
  206. | "animation-name"
  207. | "animation-play-state"
  208. | "animation-timing-function" => apply_animation(name, value, style),
  209. "backface-visibility" => {}
  210. "background"
  211. | "background-attachment"
  212. | "background-clip"
  213. | "background-color"
  214. | "background-image"
  215. | "background-origin"
  216. | "background-position"
  217. | "background-repeat"
  218. | "background-size" => apply_background(name, value, style),
  219. "border"
  220. | "border-bottom"
  221. | "border-bottom-color"
  222. | "border-bottom-left-radius"
  223. | "border-bottom-right-radius"
  224. | "border-bottom-style"
  225. | "border-bottom-width"
  226. | "border-collapse"
  227. | "border-color"
  228. | "border-image"
  229. | "border-image-outset"
  230. | "border-image-repeat"
  231. | "border-image-slice"
  232. | "border-image-source"
  233. | "border-image-width"
  234. | "border-left"
  235. | "border-left-color"
  236. | "border-left-style"
  237. | "border-left-width"
  238. | "border-radius"
  239. | "border-right"
  240. | "border-right-color"
  241. | "border-right-style"
  242. | "border-right-width"
  243. | "border-spacing"
  244. | "border-style"
  245. | "border-top"
  246. | "border-top-color"
  247. | "border-top-left-radius"
  248. | "border-top-right-radius"
  249. | "border-top-style"
  250. | "border-top-width"
  251. | "border-width" => apply_border(name, value, style),
  252. "bottom" => {}
  253. "box-shadow" => {}
  254. "box-sizing" => {}
  255. "caption-side" => {}
  256. "clear" => {}
  257. "clip" => {}
  258. "color" => {
  259. if let Ok(c) = value.parse() {
  260. style.core.fg.replace(c);
  261. }
  262. }
  263. "columns" => {}
  264. "content" => {}
  265. "counter-increment" => {}
  266. "counter-reset" => {}
  267. "cursor" => {}
  268. "empty-cells" => {}
  269. "float" => {}
  270. "font" | "font-family" | "font-size" | "font-size-adjust" | "font-stretch"
  271. | "font-style" | "font-variant" | "font-weight" => apply_font(name, value, style),
  272. "letter-spacing" => {}
  273. "line-height" => {}
  274. "list-style" | "list-style-image" | "list-style-position" | "list-style-type" => {}
  275. "opacity" => {}
  276. "order" => {}
  277. "outline" => {}
  278. "outline-color" | "outline-offset" | "outline-style" | "outline-width" => {}
  279. "page-break-after" | "page-break-before" | "page-break-inside" => {}
  280. "perspective" | "perspective-origin" => {}
  281. "pointer-events" => {}
  282. "quotes" => {}
  283. "resize" => {}
  284. "tab-size" => {}
  285. "table-layout" => {}
  286. "text-align"
  287. | "text-align-last"
  288. | "text-decoration"
  289. | "text-decoration-color"
  290. | "text-decoration-line"
  291. | "text-decoration-style"
  292. | "text-indent"
  293. | "text-justify"
  294. | "text-overflow"
  295. | "text-shadow"
  296. | "text-transform" => apply_text(name, value, style),
  297. "transition"
  298. | "transition-delay"
  299. | "transition-duration"
  300. | "transition-property"
  301. | "transition-timing-function" => apply_transition(name, value, style),
  302. "visibility" => {}
  303. "white-space" => {}
  304. _ => {}
  305. }
  306. }
  307. fn apply_background(name: &str, value: &str, style: &mut StyleModifier) {
  308. match name {
  309. "background-color" => {
  310. if let Ok(c) = value.parse() {
  311. style.core.bg.replace(c);
  312. }
  313. }
  314. "background" => {}
  315. "background-attachment" => {}
  316. "background-clip" => {}
  317. "background-image" => {}
  318. "background-origin" => {}
  319. "background-position" => {}
  320. "background-repeat" => {}
  321. "background-size" => {}
  322. _ => {}
  323. }
  324. }
  325. fn apply_border(name: &str, value: &str, style: &mut StyleModifier) {
  326. fn parse_border_style(v: &str) -> BorderStyle {
  327. match v {
  328. "dotted" => BorderStyle::Dotted,
  329. "dashed" => BorderStyle::Dashed,
  330. "solid" => BorderStyle::Solid,
  331. "double" => BorderStyle::Double,
  332. "groove" => BorderStyle::Groove,
  333. "ridge" => BorderStyle::Ridge,
  334. "inset" => BorderStyle::Inset,
  335. "outset" => BorderStyle::Outset,
  336. "none" => BorderStyle::None,
  337. "hidden" => BorderStyle::Hidden,
  338. _ => todo!(),
  339. }
  340. }
  341. match name {
  342. "border" => {}
  343. "border-bottom" => {}
  344. "border-bottom-color" => {
  345. if let Ok(c) = value.parse() {
  346. style.modifier.borders.bottom.color = Some(c);
  347. }
  348. }
  349. "border-bottom-left-radius" => {
  350. if let Some(v) = parse_value(value) {
  351. style.modifier.borders.left.radius = v;
  352. }
  353. }
  354. "border-bottom-right-radius" => {
  355. if let Some(v) = parse_value(value) {
  356. style.modifier.borders.right.radius = v;
  357. }
  358. }
  359. "border-bottom-style" => style.modifier.borders.bottom.style = parse_border_style(value),
  360. "border-bottom-width" => {
  361. if let Some(v) = parse_value(value) {
  362. style.modifier.borders.bottom.width = v;
  363. }
  364. }
  365. "border-collapse" => {}
  366. "border-color" => {
  367. let values: Vec<_> = value.split(' ').collect();
  368. if values.len() == 1 {
  369. if let Ok(c) = values[0].parse() {
  370. style
  371. .modifier
  372. .borders
  373. .slice()
  374. .iter_mut()
  375. .for_each(|b| b.color = Some(c));
  376. }
  377. } else {
  378. for (v, b) in values
  379. .into_iter()
  380. .zip(style.modifier.borders.slice().iter_mut())
  381. {
  382. if let Ok(c) = v.parse() {
  383. b.color = Some(c);
  384. }
  385. }
  386. }
  387. }
  388. "border-image" => {}
  389. "border-image-outset" => {}
  390. "border-image-repeat" => {}
  391. "border-image-slice" => {}
  392. "border-image-source" => {}
  393. "border-image-width" => {}
  394. "border-left" => {}
  395. "border-left-color" => {
  396. if let Ok(c) = value.parse() {
  397. style.modifier.borders.left.color = Some(c);
  398. }
  399. }
  400. "border-left-style" => style.modifier.borders.left.style = parse_border_style(value),
  401. "border-left-width" => {
  402. if let Some(v) = parse_value(value) {
  403. style.modifier.borders.left.width = v;
  404. }
  405. }
  406. "border-radius" => {
  407. let values: Vec<_> = value.split(' ').collect();
  408. if values.len() == 1 {
  409. if let Some(r) = parse_value(values[0]) {
  410. style
  411. .modifier
  412. .borders
  413. .slice()
  414. .iter_mut()
  415. .for_each(|b| b.radius = r);
  416. }
  417. } else {
  418. for (v, b) in values
  419. .into_iter()
  420. .zip(style.modifier.borders.slice().iter_mut())
  421. {
  422. if let Some(r) = parse_value(v) {
  423. b.radius = r;
  424. }
  425. }
  426. }
  427. }
  428. "border-right" => {}
  429. "border-right-color" => {
  430. if let Ok(c) = value.parse() {
  431. style.modifier.borders.right.color = Some(c);
  432. }
  433. }
  434. "border-right-style" => style.modifier.borders.right.style = parse_border_style(value),
  435. "border-right-width" => {
  436. if let Some(v) = parse_value(value) {
  437. style.modifier.borders.right.width = v;
  438. }
  439. }
  440. "border-spacing" => {}
  441. "border-style" => {
  442. let values: Vec<_> = value.split(' ').collect();
  443. if values.len() == 1 {
  444. let border_style = parse_border_style(values[0]);
  445. style
  446. .modifier
  447. .borders
  448. .slice()
  449. .iter_mut()
  450. .for_each(|b| b.style = border_style);
  451. } else {
  452. for (v, b) in values
  453. .into_iter()
  454. .zip(style.modifier.borders.slice().iter_mut())
  455. {
  456. b.style = parse_border_style(v);
  457. }
  458. }
  459. }
  460. "border-top" => {}
  461. "border-top-color" => {
  462. if let Ok(c) = value.parse() {
  463. style.modifier.borders.top.color = Some(c);
  464. }
  465. }
  466. "border-top-left-radius" => {
  467. if let Some(v) = parse_value(value) {
  468. style.modifier.borders.left.radius = v;
  469. }
  470. }
  471. "border-top-right-radius" => {
  472. if let Some(v) = parse_value(value) {
  473. style.modifier.borders.right.radius = v;
  474. }
  475. }
  476. "border-top-style" => style.modifier.borders.top.style = parse_border_style(value),
  477. "border-top-width" => {
  478. if let Some(v) = parse_value(value) {
  479. style.modifier.borders.top.width = v;
  480. }
  481. }
  482. "border-width" => {
  483. let values: Vec<_> = value.split(' ').collect();
  484. if values.len() == 1 {
  485. if let Some(w) = parse_value(values[0]) {
  486. style
  487. .modifier
  488. .borders
  489. .slice()
  490. .iter_mut()
  491. .for_each(|b| b.width = w);
  492. }
  493. } else {
  494. for (v, width) in values
  495. .into_iter()
  496. .zip(style.modifier.borders.slice().iter_mut())
  497. {
  498. if let Some(w) = parse_value(v) {
  499. width.width = w;
  500. }
  501. }
  502. }
  503. }
  504. _ => (),
  505. }
  506. }
  507. fn apply_animation(name: &str, _value: &str, _style: &mut StyleModifier) {
  508. match name {
  509. "animation" => {}
  510. "animation-delay" => {}
  511. "animation-direction =>{}" => {}
  512. "animation-duration" => {}
  513. "animation-fill-mode" => {}
  514. "animation-itera =>{}tion-count" => {}
  515. "animation-name" => {}
  516. "animation-play-state" => {}
  517. "animation-timing-function" => {}
  518. _ => {}
  519. }
  520. }
  521. fn apply_font(name: &str, value: &str, style: &mut StyleModifier) {
  522. use ratatui::style::Modifier;
  523. match name {
  524. "font" => (),
  525. "font-family" => (),
  526. "font-size" => (),
  527. "font-size-adjust" => (),
  528. "font-stretch" => (),
  529. "font-style" => match value {
  530. "italic" => style.core = style.core.add_modifier(Modifier::ITALIC),
  531. "oblique" => style.core = style.core.add_modifier(Modifier::ITALIC),
  532. _ => (),
  533. },
  534. "font-variant" => todo!(),
  535. "font-weight" => match value {
  536. "bold" => style.core = style.core.add_modifier(Modifier::BOLD),
  537. "normal" => style.core = style.core.remove_modifier(Modifier::BOLD),
  538. _ => (),
  539. },
  540. _ => (),
  541. }
  542. }
  543. fn apply_text(name: &str, value: &str, style: &mut StyleModifier) {
  544. use ratatui::style::Modifier;
  545. match name {
  546. "text-align" => todo!(),
  547. "text-align-last" => todo!(),
  548. "text-decoration" | "text-decoration-line" => {
  549. for v in value.split(' ') {
  550. match v {
  551. "line-through" => style.core = style.core.add_modifier(Modifier::CROSSED_OUT),
  552. "underline" => style.core = style.core.add_modifier(Modifier::UNDERLINED),
  553. _ => (),
  554. }
  555. }
  556. }
  557. "text-decoration-color" => todo!(),
  558. "text-decoration-style" => todo!(),
  559. "text-indent" => todo!(),
  560. "text-justify" => todo!(),
  561. "text-overflow" => todo!(),
  562. "text-shadow" => todo!(),
  563. "text-transform" => todo!(),
  564. _ => todo!(),
  565. }
  566. }
  567. fn apply_transition(_name: &str, _value: &str, _style: &mut StyleModifier) {
  568. todo!()
  569. }
  570. const SORTED_STYLE_ATTRS: &[&str] = &[
  571. "animation",
  572. "animation-delay",
  573. "animation-direction",
  574. "animation-duration",
  575. "animation-fill-mode",
  576. "animation-iteration-count",
  577. "animation-name",
  578. "animation-play-state",
  579. "animation-timing-function",
  580. "backface-visibility",
  581. "background",
  582. "background-attachment",
  583. "background-clip",
  584. "background-color",
  585. "background-image",
  586. "background-origin",
  587. "background-position",
  588. "background-repeat",
  589. "background-size",
  590. "border",
  591. "border-bottom",
  592. "border-bottom-color",
  593. "border-bottom-left-radius",
  594. "border-bottom-right-radius",
  595. "border-bottom-style",
  596. "border-bottom-width",
  597. "border-collapse",
  598. "border-color",
  599. "border-image",
  600. "border-image-outset",
  601. "border-image-repeat",
  602. "border-image-slice",
  603. "border-image-source",
  604. "border-image-width",
  605. "border-left",
  606. "border-left-color",
  607. "border-left-style",
  608. "border-left-width",
  609. "border-radius",
  610. "border-right",
  611. "border-right-color",
  612. "border-right-style",
  613. "border-right-width",
  614. "border-spacing",
  615. "border-style",
  616. "border-top",
  617. "border-top-color",
  618. "border-top-left-radius",
  619. "border-top-right-radius",
  620. "border-top-style",
  621. "border-top-width",
  622. "border-width",
  623. "bottom",
  624. "box-shadow",
  625. "box-sizing",
  626. "caption-side",
  627. "clear",
  628. "clip",
  629. "color",
  630. "columns",
  631. "content",
  632. "counter-increment",
  633. "counter-reset",
  634. "cursor",
  635. "empty-cells",
  636. "float",
  637. "font",
  638. "font-family",
  639. "font-size",
  640. "font-size-adjust",
  641. "font-stretch",
  642. "font-style",
  643. "font-variant",
  644. "font-weight",
  645. "letter-spacing",
  646. "line-height",
  647. "list-style",
  648. "list-style-image",
  649. "list-style-position",
  650. "list-style-type",
  651. "opacity",
  652. "order",
  653. "outline",
  654. "outline-color",
  655. "outline-offset",
  656. "outline-style",
  657. "outline-width",
  658. "page-break-after",
  659. "page-break-before",
  660. "page-break-inside",
  661. "perspective",
  662. "perspective-origin",
  663. "pointer-events",
  664. "quotes",
  665. "resize",
  666. "tab-size",
  667. "table-layout",
  668. "text-align",
  669. "text-align-last",
  670. "text-decoration",
  671. "text-decoration-color",
  672. "text-decoration-line",
  673. "text-decoration-style",
  674. "text-indent",
  675. "text-justify",
  676. "text-overflow",
  677. "text-shadow",
  678. "text-transform",
  679. "transition",
  680. "transition-delay",
  681. "transition-duration",
  682. "transition-property",
  683. "transition-timing-function",
  684. "visibility",
  685. "white-space",
  686. "background-color",
  687. "background",
  688. "background-attachment",
  689. "background-clip",
  690. "background-image",
  691. "background-origin",
  692. "background-position",
  693. "background-repeat",
  694. "background-size",
  695. "dotted",
  696. "dashed",
  697. "solid",
  698. "double",
  699. "groove",
  700. "ridge",
  701. "inset",
  702. "outset",
  703. "none",
  704. "hidden",
  705. "border",
  706. "border-bottom",
  707. "border-bottom-color",
  708. "border-bottom-left-radius",
  709. "border-bottom-right-radius",
  710. "border-bottom-style",
  711. "border-bottom-width",
  712. "border-collapse",
  713. "border-color",
  714. "border-image",
  715. "border-image-outset",
  716. "border-image-repeat",
  717. "border-image-slice",
  718. "border-image-source",
  719. "border-image-width",
  720. "border-left",
  721. "border-left-color",
  722. "border-left-style",
  723. "border-left-width",
  724. "border-radius",
  725. "border-right",
  726. "border-right-color",
  727. "border-right-style",
  728. "border-right-width",
  729. "border-spacing",
  730. "border-style",
  731. "border-top",
  732. "border-top-color",
  733. "border-top-left-radius",
  734. "border-top-right-radius",
  735. "border-top-style",
  736. "border-top-width",
  737. "border-width",
  738. "animation",
  739. "animation-delay",
  740. "animation-direction",
  741. "animation-duration",
  742. "animation-fill-mode",
  743. "animation-itera ",
  744. "animation-name",
  745. "animation-play-state",
  746. "animation-timing-function",
  747. "font",
  748. "font-family",
  749. "font-size",
  750. "font-size-adjust",
  751. "font-stretch",
  752. "font-style",
  753. "italic",
  754. "oblique",
  755. "font-variant",
  756. "font-weight",
  757. "bold",
  758. "normal",
  759. "text-align",
  760. "text-align-last",
  761. "text-decoration",
  762. "text-decoration-line",
  763. "line-through",
  764. "underline",
  765. "text-decoration-color",
  766. "text-decoration-style",
  767. "text-indent",
  768. "text-justify",
  769. "text-overflow",
  770. "text-shadow",
  771. "text-transform",
  772. ];