-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #126 from gridaco/staging
March release #2
- Loading branch information
Showing
23 changed files
with
527 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# CSS - Blend mode | ||
|
||
## Supported types | ||
|
||
``` | ||
normal | multiply | screen | overlay | darken | lighten | color-dodge | color-burn | hard-light | soft-light | difference | exclusion | hue | saturation | color | luminosity | ||
``` | ||
|
||
## Warning Lack of browser support on SVG element. | ||
|
||
Applying `mix-blend-mode` to SVG element is limited in some browsers (safari & mobile browsers) See - https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode#browser_compatibility | ||
|
||
### References | ||
|
||
- [`mix-blend-mode`](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) | ||
- [`background-blend-mode`](https://developer.mozilla.org/en-US/docs/Web/CSS/background-blend-mode) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
title: "CSS How to handle multiple background fills" | ||
version: 0.1.0 | ||
revision: 1 | ||
--- | ||
|
||
# How to handle multiple background fills | ||
|
||
## Definition of `"multiple background fills"` | ||
|
||
- one or none active solid fill | ||
- one or more gradient fill above solid fill | ||
- one or more image fill | ||
|
||
## Possible combinations | ||
|
||
single solid fill | ||
|
||
```css | ||
._1 { | ||
background: #fff; | ||
} | ||
._2 { | ||
background-color: #fff; | ||
} | ||
``` | ||
|
||
single solid fill with single gradient fill | ||
|
||
```css | ||
._1 { | ||
background-color: #fff; | ||
background-image: linear-gradient(to bottom, #fff, #fff); | ||
} | ||
|
||
._2 { | ||
background: #fff; | ||
background-image: linear-gradient(to bottom, #fff, #fff); | ||
} | ||
``` | ||
|
||
no solid fill with single gradient fill | ||
|
||
```css | ||
._1 { | ||
background: linear-gradient(to bottom, #fff, #fff); | ||
} | ||
|
||
._2 { | ||
background-image: linear-gradient(to bottom, #fff, #fff); | ||
} | ||
``` | ||
|
||
no solid fill with multiple gradient fill | ||
|
||
```css | ||
._1 { | ||
background: linear-gradient(to bottom, #fff, #fff), linear-gradient(to bottom, #fff, #fff); | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
title: "CSS Gradient on text layer" | ||
version: 0.1.0 | ||
revision: 1 | ||
--- | ||
|
||
# CSS - Gradient on Text Layer | ||
|
||
Applying a gradient to a text fill is quite different from simply giving a color to a text. | ||
Yet hooray CSS, it is much more simple than other platforms (flutter, android, ...) | ||
|
||
**How to** | ||
|
||
```css | ||
h1 { | ||
font-size: 72px; | ||
background: -webkit-linear-gradient(#eee, #333); | ||
-webkit-background-clip: text; | ||
-webkit-text-fill-color: transparent; | ||
} | ||
``` | ||
|
||
### References | ||
|
||
- https://cssgradient.io/blog/css-gradient-text/ | ||
- https://github.com/gridaco/designto-code/issues/84 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: "CSS Vertically align text content" | ||
version: 0.1.0 | ||
revision: 1 | ||
--- | ||
|
||
# Vertical align of text content | ||
|
||
### References | ||
|
||
- https://stackoverflow.com/questions/8865458/how-do-i-vertically-center-text-with-css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
editor-packages/editor-canvas/overlay/overlay-container.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React from "react"; | ||
|
||
/** | ||
* @default - TODO: rotation not supported | ||
* @returns | ||
*/ | ||
export function OverlayContainer({ | ||
xywh, | ||
rotation = 0, | ||
children, | ||
}: { | ||
xywh: [number, number, number, number]; | ||
rotation: number; | ||
children: React.ReactNode; | ||
}) { | ||
// const [x, y, w, h] = xywh; | ||
return ( | ||
<div | ||
id="overlay-container" | ||
style={{ | ||
pointerEvents: "none", | ||
willChange: "transform, opacity", | ||
// transformOrigin: `${x}px ${y}px`, | ||
// transform: `rotate(${-rotation}deg)`, | ||
}} | ||
> | ||
{children} | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule design-sdk
updated
from 1212ba to 6c54a5
Submodule reflect-core
updated
from c5dc29 to 7e792b
Oops, something went wrong.
7c6ea0c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: