Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@luke-
Copy link
Contributor

@luke- luke- commented Dec 14, 2025

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • It's submitted to the develop branch, not the master branch if no hotfix
  • When resolving a specific issue, it's referenced in the PR's description (e.g. Fix #xxx[,#xxx], where "xxx" is the Github issue number)
  • All tests are passing
  • New/updated tests are included
  • Changelog was modified

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

Copy link
Collaborator

@marc-farre marc-farre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@luke- 3 "reviews"

}

$optionsRef = $this->getOptionsRef();
$optionsRef = ArrayHelper::merge($this->getOptionsRef(), $options);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks weird in the IDE:
image

/**
* @param string $color Hexadecimal, RGB, RGBA, HSL, HSLA
*/
public function cssBgColor(?string $color): static
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we shouldn't encourage adding inline styling, especially for colors.
We already have ->style() for the rare case when we really need to force a color.

Instead, I would create a cssColor() method for the HtmlA class, which would only accept a BS color (success, etc.)
It would add one of these classes: https://getbootstrap.com/docs/5.3/helpers/colored-links/#link-colors

/**
* @param string $color Hexadecimal, RGB, RGBA, HSL, HSLA
*/
public function cssTextColor(?string $color): static
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, I would remove it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants