Fix 'grid' shorthand serialization

This commit is contained in:
Nazım Can Altınova 2017-07-03 11:44:11 -07:00
parent af96e09c7f
commit 8827cb1440
3 changed files with 41 additions and 20 deletions

View file

@ -252,6 +252,13 @@ impl<L> Default for TrackSize<L> {
}
}
impl<L: PartialEq> TrackSize<L> {
/// Returns true if current TrackSize is same as default.
pub fn is_default(&self) -> bool {
*self == TrackSize::default()
}
}
impl<L: ToCss> ToCss for TrackSize<L> {
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
match *self {