Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override hardcoded stylesheets in PHP XHTML formats #97

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

haszi
Copy link
Contributor

@haszi haszi commented Feb 13, 2024

Let the --css option override the default stylesheets for all PHP XHTML-based formats. Closes #70.

Phd's --css option allows to pass stylesheets to the rendered formats. However, in the constructor of the PHP_ChunkedXHTML format two stylesheets from php.net are added to every rendering in this format.
This PR changes this behaviour so that the hardcoded stylesheets are only added if there are no stylesheets passed in from the command line and it applies this to all of the XHTML-based format in the PHP package.
The default behavior (ie. without the --css option) does not change for the PHP_ChunkedXHTML format.

Let the --css option override the default stylesheets for all PHP XHTML-based formats.
Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

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

LGTM

@Girgias Girgias merged commit 2f71e8e into php:master Feb 13, 2024
4 checks passed
@haszi haszi deleted the Override-stylesheets-in-PHP-XHTML-formats branch February 13, 2024 17:38
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.

Speed up or avoid downloading of css from http://www.php.net in render.php
2 participants