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

CSS handling multiline code #2650

Merged
merged 1 commit into from
Jan 26, 2023
Merged

CSS handling multiline code #2650

merged 1 commit into from
Jan 26, 2023

Conversation

colombod
Copy link
Member

fixes #2649

@colombod colombod added Area-Formatting Data and object formatting as HTML and plaintext bug Something isn't working labels Jan 26, 2023
@@ -73,7 +73,7 @@ private static async Task<string> GetInputAsync(string prompt, bool isPassword,
public static void CSS(string content) =>
// From https://stackoverflow.com/questions/524696/how-to-create-a-style-tag-with-javascript
Javascript($@"
var css = '{content}',
var css = `{content}`,
Copy link
Contributor

Choose a reason for hiding this comment

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

I was considering removing this method altogether, along with the Javascript method. People should likely be emitting HTML elements for this or calling a JavaScript kernel if one is available.

Copy link
Member Author

Choose a reason for hiding this comment

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

this is blocking some notebooks development as that is public api. I'd fix it and mark as deprecated?

Copy link
Member Author

Choose a reason for hiding this comment

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

but I think is very convenient shortcut to be able to sue the CSS helper to add styles

Copy link
Contributor

Choose a reason for hiding this comment

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

Convenient isn't sufficient if it doesn't work consistently.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd suggest we leave it for now, with the fix, but should discuss whether this is the right design, especially given the Pythonesque top-level function name.

@jonsequitur jonsequitur merged commit 60b3928 into dotnet:main Jan 26, 2023
@colombod colombod deleted the css_verbatim branch January 26, 2023 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Formatting Data and object formatting as HTML and plaintext bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CSS doesn't work with multiline text
2 participants