style_attributes.rs 23 KB

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