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

support styles for para #471

Open
gintama91 opened this issue Nov 29, 2023 · 2 comments
Open

support styles for para #471

gintama91 opened this issue Nov 29, 2023 · 2 comments
Labels
good first issue Good for newcomers KWoC-2023 IIT Kharagpur Winter of Code 2023 - good for new contributors

Comments

@gintama91
Copy link
Collaborator

gintama91 commented Nov 29, 2023

# :justify, :leading, :click, :motion, :release, :hover, :leave,
#   :rise, :kerning, :stretch

Some of these may already be implemented. As a good first issue, pick one of these, or a couple of related ones, not the whole list.

NOTE; for info regarding what above things are supposed to do , search that term in manual.md , eg: search for display_left in manual.md
and you will find a explanation

currently we support some , but we don't support quite a few

This can be done like this for example:

If u pick to add support for :display_left

head over to this file and add display_left as shoes style/display property

now you can pass :display-left from shoes code

for eg:

Shoes.app do
   para "hi" ,display_left: "20"
 end

this won't cause you a error, but this don't do anything so we need to update in scarpe-components

this file specifically

for this display_left

just editing para_style method as follows should work

  def para_style(props)
    drawable_style(props).merge({
      color: rgb_to_hex(props["stroke"]),
      "font-size": para_font_size(props),
      "font-family": props["font"],
      "position": "relative",
      "left": props["display_left"] ? props["display_left"] : nil,
    }.compact)
  end

add necessary styles there , if you need js you probably have to look at DOMWrangler/ELEMENTWrangler , i dont think u would need js for most of the above mentioned ones, changing html and css should suffice for most.

discord comment from noah link : https://discord.com/channels/1072538177321058377/1072538178659024898/1178710511551000606

@gintama91 gintama91 added good first issue Good for newcomers KWoC-2023 IIT Kharagpur Winter of Code 2023 - good for new contributors labels Nov 29, 2023
@zoomzam
Copy link
Contributor

zoomzam commented Dec 5, 2023

Do you mean displace_left @gintama91 ?

@noahgibbs
Copy link
Collaborator

I think he does, yeah.

@Nj221102 Nj221102 mentioned this issue Jan 29, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers KWoC-2023 IIT Kharagpur Winter of Code 2023 - good for new contributors
Projects
None yet
Development

No branches or pull requests

3 participants