mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Use cbindgen for css-align types.
This provides stronger typing and removes a bunch of subtle constants matching. Differential Revision: https://phabricator.services.mozilla.com/D61058
This commit is contained in:
parent
41ae92e045
commit
2bdcd766bb
3 changed files with 39 additions and 100 deletions
|
@ -9,7 +9,7 @@
|
|||
use crate::values::computed::{Context, ToComputedValue};
|
||||
use crate::values::specified;
|
||||
|
||||
pub use super::specified::{AlignContent, AlignItems, JustifyContent, SelfAlignment};
|
||||
pub use super::specified::{AlignContent, AlignItems, ContentDistribution, JustifyContent, SelfAlignment};
|
||||
pub use super::specified::{AlignSelf, JustifySelf};
|
||||
|
||||
/// The computed value for the `justify-items` property.
|
||||
|
@ -34,7 +34,8 @@ pub use super::specified::{AlignSelf, JustifySelf};
|
|||
///
|
||||
/// See the discussion in https://bugzil.la/1384542.
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, ToCss, ToResolvedValue)]
|
||||
pub struct JustifyItems {
|
||||
#[repr(C)]
|
||||
pub struct ComputedJustifyItems {
|
||||
/// The specified value for the property. Can contain the bare `legacy`
|
||||
/// keyword.
|
||||
#[css(skip)]
|
||||
|
@ -45,6 +46,8 @@ pub struct JustifyItems {
|
|||
pub computed: specified::JustifyItems,
|
||||
}
|
||||
|
||||
pub use self::ComputedJustifyItems as JustifyItems;
|
||||
|
||||
impl JustifyItems {
|
||||
/// Returns the `legacy` value.
|
||||
pub fn legacy() -> Self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue