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

Added and Fixed Para Styles #534

Merged
merged 2 commits into from
Jan 31, 2024
Merged

Added and Fixed Para Styles #534

merged 2 commits into from
Jan 31, 2024

Conversation

Nj221102
Copy link
Contributor

@Nj221102 Nj221102 commented Jan 31, 2024

Description

Added some more para styles like font-variant, font shorthand
updated some para styles like font-family, emphasis

emphasis wasn't working before because it wasn't mentioned in shoes styles in lacci/lib/shoes/drawables/para.rb , so i made changes and now emphasis works
font-family was mentioned as font in shoes styles so i changed it to family , because i wanted to use font for font shorthand(same as css) , and family also does sound better for font-family.

I have added a parse method to font -shorthand, so it doesn't matter in which pattern we enter properties as long as we maintain the gap of whitespace in between.

Shoes.app do

    para "this text is in normal styl" , emphasis:"italic"

    para "this text is in italic style" , font: "italic normal bold 16px 'Times New Roman', serif;"

    para "this text is in oblique style " , family: "'Pacifico', cursive;"

    para "Text in Helvetica", font: "Helvetica;"
      
    para "And in Lucida", font: "'Pacifico', cursive;"
      
    para "From an example", font: "Trebuchet  bold"
      
end
Shoes.app do

    para "This is Normal Variant" ,font_variant: "normal"


    para "This is Small Caps Variant " ,font_variant: "small-caps"

  end

Image(if needed, helps for a faster review)

Screenshot 2024-01-30 at 7 26 17 PM Screenshot 2024-01-31 at 11 44 05 PM

Checklist

  • Run tests locally

@Nj221102 Nj221102 changed the title New Added and Fixed Para Styles Jan 31, 2024
@Nj221102 Nj221102 mentioned this pull request Jan 31, 2024
1 task
@noahgibbs
Copy link
Collaborator

This looks good. It would benefit from tests -- that regex, for instance, is easily big enough to want testing. But this is a big improvement over where we are now, so I'm happy to merge it now and add tests later :-)

@noahgibbs noahgibbs merged commit b1a66e3 into scarpe-team:main Jan 31, 2024
1 check passed
@Nj221102
Copy link
Contributor Author

Nj221102 commented Feb 1, 2024

This looks good. It would benefit from tests -- that regex, for instance, is easily big enough to want testing. But this is a big improvement over where we are now, so I'm happy to merge it now and add tests later :-)

Thanks for merging, if there is any problem with the code plz inform me, I will try my best to fix it

@Nj221102 Nj221102 deleted the new branch February 1, 2024 06:02
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.

2 participants