// Copyright (c) 2025 MatteuSan and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.

@use 'sass:math';

/// Converts px values to rem values.
/// @param {int} $px
/// @return {int} rem value.
@function to-rem($px) {
  @return math.div($px, 16px) * 1rem;
}

/// Converts px values to em values.
/// @param {int} $px
/// @return {int} em value.
@function to-em($px) {
  @return math.div($px, 16px) * 1em;
}

/// Converts px values to rem values.
/// @deprecated Use to-rem() function instead.
/// @param {int} $px
/// @return {int} rem value.
@function px-to-rem($px) {
  @warn 'This function is soon to be deprecated. Use to-rem() function instead.';
  @return to-rem($px);
}