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

TextDrawable improvements #520

Open
noahgibbs opened this issue Dec 19, 2023 · 9 comments
Open

TextDrawable improvements #520

noahgibbs opened this issue Dec 19, 2023 · 9 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@noahgibbs
Copy link
Collaborator

There are a few styles we don't support for TextDrawable.

We don't look at LinkHover (relevant to links, but not other TextDrawables.)

And we don't support :family, :weight, :rise, :kerning, :emphasis, :stretch, :variant styles.

And the way we use the :font style is actually more like :family -- :font is supposed to be a property you can set to set several other things.

Fixing a style could be a great first issue: pick a property (e.g. rise, kerning or emphasis.) Look it up in the Shoes manual to figure out its type and possible values, and what it does. Figure out how to turn it into CSS. Then in scarpe-components/lib/scarpe/components/calzini/text_drawables.rb, set the CSS style for it when the Shoes style is set. There are a lot of styles that we already do that with.

LinkHover is harder because you can't set a hover rule as inline CSS, so it will probably require doing something with the stylesheet in the empty page. But maybe we could set a CSS variable on the element (called something like hover-color) and have the stylesheet use that as the color when hovering? Something along those lines. I don't think we want to register an onmouseover handler for this, because that could conflict with the TextDrawable registering its own Shoes hover handler (which it's 100% allowed to do.)

@noahgibbs noahgibbs added enhancement New feature or request good first issue Good for newcomers labels Dec 19, 2023
@imlakshay08
Copy link
Contributor

Hey @noahgibbs , I would like to work on this issue. Would you please assign me this please ?

@gintama91
Copy link
Collaborator

hey @imlakshay08 I've assigned u , feel free to hop into discord if u have any questions. or even to just talk.

goodluck.

@imlakshay08
Copy link
Contributor

@gintama91 . Thank you very much. It would be helpful if could you provide the link to discord ? I cannot find it anywhere.

@Pavan-Nambi
Copy link

@imlakshay08 here

@imlakshay08
Copy link
Contributor

@imlakshay08 here

Thank you.

@imlakshay08
Copy link
Contributor

Hey @noahgibbs , could I work on other unsupported properties mentioned in issue as well, like :rise and :kerning?

@noahgibbs
Copy link
Collaborator Author

Absolutely. You could open a new issue for that, or just work on them and open a PR :-)

@imlakshay08
Copy link
Contributor

Hey @noahgibbs , I have made a PR for both rise and kerning. Sorry for being late, been busy due to some personal commitments.

@noahgibbs
Copy link
Collaborator Author

No trouble on late, we're not on any specific schedule :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants