PlaceContentStyleValue.cpp 555 B

1234567891011121314151617181920
  1. /*
  2. * Copyright (c) 2023, Hunter Salyer <thefalsehonesty@gmail.com>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include "PlaceContentStyleValue.h"
  7. namespace Web::CSS {
  8. ErrorOr<String> PlaceContentStyleValue::to_string() const
  9. {
  10. auto align_content = TRY(m_properties.align_content->to_string());
  11. auto justify_content = TRY(m_properties.justify_content->to_string());
  12. if (align_content == justify_content)
  13. return String::formatted("{}", align_content);
  14. return String::formatted("{} {}", align_content, justify_content);
  15. }
  16. }