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

Add custom color highlighting for nested Turbo Frames #33

Open
lirtistan opened this issue Jun 10, 2024 · 2 comments
Open

Add custom color highlighting for nested Turbo Frames #33

lirtistan opened this issue Jun 10, 2024 · 2 comments
Labels
enhancement New feature or request Turbo

Comments

@lirtistan
Copy link
Contributor

Hi,

nested turbo frames should have a differnt color so we can distinguish there boundings.

<div class="w-75 mx-auto mt-9">
	<%= turbo_frame_tag "foo" do %>
		<p>stuff in "foo" frame</p>
		<%= turbo_frame_tag "bar" do %>
			<p>some stuff in inner "bar" frame</p>
		<% end %>
	<% end %>
</div>

looks actually like this...

Screenshot from 2024-06-10 19-30-19

Actually i don't know how hard it is to implement, but maybe in a future version, that whould be a nice feature.

@lirtistan lirtistan changed the title nested turbo frames need a different outline/background color nested turbo frames should have a different outline/background color Jun 10, 2024
@leonvogt leonvogt added enhancement New feature or request Turbo labels Jun 10, 2024
@leonvogt
Copy link
Owner

@lirtistan, thanks for opening this issue.

Was thinking about different highlighting for nested frames too! I'm just not sure yet how to define the colors.

  • Maybe alternate between darker and lighter versions of your chosen frame highlight color?
  • Or perhaps use an analogous color palette based on your frame highlight color, like some color pickers offer.

@lirtistan
Copy link
Contributor Author

Was thinking about different highlighting for nested frames too! I'm just not sure yet how to define the colors.

maybe the colors can be generated on the fly or just embedded as a predefined config.

  • Maybe alternate between darker and lighter versions of your chosen frame highlight color?

i think of two columns column1 contains all colors for the prefered-color-scheme: light and column2 contains them respectively for the prefered-color-scheme: dark, but each row should be considered as color pair. those colors don't know where they come from yet, should then be injected into the actual tab content as css rules somehow.

yes that can also be a method. Consider that users may want to change those colors.

@leonvogt leonvogt changed the title nested turbo frames should have a different outline/background color Add custom color highlighting for nested Turbo Frames Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Turbo
Projects
None yet
Development

No branches or pull requests

2 participants