style_attributes.rs 22 KB

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