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 box shadow #68

Merged
merged 25 commits into from
Nov 11, 2021
Merged

Support box shadow #68

merged 25 commits into from
Nov 11, 2021

Conversation

You-J
Copy link
Collaborator

@You-J You-J commented Nov 9, 2021

update

  1. Dropbox limited multi-support
  2. Support for SpreadRadius
  3. Code support that was only supported in flutter preview

Screen Shot 2021-11-09 at 8 45 41 PM

after
Screen Shot 2021-11-10 at 4 40 05 AM
add spreadRadius in box-shadow)

test link: http://localhost:6626/to-code?framework=flutter&preview=vanilla&design=https://www.figma.com/file/iypAHagtcSp3Osfo2a7EDz/engine?node-id=3793%3A3893

text link2(group shadow): http://localhost:6626/to-code?framework=flutter&preview=vanilla&design=https://www.figma.com/file/iypAHagtcSp3Osfo2a7EDz/engine?node-id=4022%3A3893

@vercel
Copy link

vercel bot commented Nov 9, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/grida/designto-codes/Fv8YvZJ7QG14PZpmFRQdQsadhTxj
✅ Preview: https://designto-codes-git-support-flutter-box-shadow-grida.vercel.app

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@You-J You-J changed the title Support box shadow in flutter Support box shadow Nov 10, 2021
Copy link
Member

@softmarshmallow softmarshmallow left a comment

Choose a reason for hiding this comment

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

ignoreme

Comment on lines +7 to +37
# Figma Box Shadow

The box shadow is handled as the shadow of the effect from figma.

![](https://static.figma.com/uploads/9def6cce093b164306328ee228028155d13d72d0)

[figma DropShadowEffect](https://www.figma.com/plugin-docs/api/Effect/#dropshadoweffect)

[W3C](https://drafts.csswg.org/css-backgrounds/#box-shadow)

## drop-shadow

**css**

- [box-shadow](https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow)

**syntax**

offset-x | offset-y | color

offset-x | offset-y | blur-radius | color

offset-x | offset-y | blur-radius | spread-radius | color

inset | offset-x | offset-y | color

Any number of shadows, separated by commas

```css
box-shadow: 12px 12px 2px 1px rgba(0, 0, 255, 0.2);
```
Copy link
Member

Choose a reason for hiding this comment

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

Can be better

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is this comment a question?
If this is a question, I'll add more info.

@@ -2,12 +2,17 @@ import { BoxShadowManifest } from "@reflect-ui/core/lib/box-shadow";
import { color } from "../color";
import { px } from "../dimensions";

export function boxshadow(bs: BoxShadowManifest): string {
if (!bs) {
export function boxshadow(bs: BoxShadowManifest[]): string {
Copy link
Member

Choose a reason for hiding this comment

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

function boxshadow (...bs: BoxShadowManifest[]){
    /// ...
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Why use Spread Operator to objectify bs?

@You-J You-J marked this pull request as draft November 10, 2021 11:03
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.

None yet

3 participants