PlaceItemsStyleValue.cpp 534 B

1234567891011121314151617181920
  1. /*
  2. * Copyright (c) 2023, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include "PlaceItemsStyleValue.h"
  7. namespace Web::CSS {
  8. String PlaceItemsStyleValue::to_string() const
  9. {
  10. auto align_items = m_properties.align_items->to_string();
  11. auto justify_items = m_properties.justify_items->to_string();
  12. if (align_items == justify_items)
  13. return MUST(String::formatted("{}", align_items));
  14. return MUST(String::formatted("{} {}", align_items, justify_items));
  15. }
  16. }