You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm Reporting a bug or issue with adding 'position:absolute' within the "styled-components" example.
Expected behaviour:
To be able to select and move rendered Sketch elements.
Observed behavior:
You cannot select and move rendered elements in sketch that have the style 'position:absolute'.
You can however click any other element to select the group and move.
I've experienced this before. It happens when the absolute element has a parent without explicit height/width set.
Parent without height/width example:
// You cannot interact with the red rectangle without selecting it from the layer listimportReactfrom'react';import{View,render}from'react-sketchapp';constTestComponent=()=>(<View><Viewstyle={{width: 50,height: 50,backgroundColor: 'red',position: 'absolute'}}/></View>);exportdefault()=>{render(<TestComponent/>,context.document.currentPage());};
Parent with height/width example:
// You can interact with the red rectangle like normalimportReactfrom'react';import{View,render}from'react-sketchapp';constTestComponent=()=>(<Viewstyle={{width: 50,height: 50}}><Viewstyle={{width: 50,height: 50,backgroundColor: 'red',position: 'absolute'}}/></View>);exportdefault()=>{render(<TestComponent/>,context.document.currentPage());};
I am Lincoln Mitchell
I'm Reporting a bug or issue with adding 'position:absolute' within the "styled-components" example.
Expected behaviour:
To be able to select and move rendered Sketch elements.
Observed behavior:
You cannot select and move rendered elements in sketch that have the style 'position:absolute'.
You can however click any other element to select the group and move.
How to reproduce:
const SwatchTile = styled.View
height: 250px;
width: 250px;
border-radius: 4px;
margin: 4px;
background-color: ${props => props.hex};
justify-content: center;
align-items: center;
position:absolute;
left:100px;
bottom: 100px;
;
Sketch version:
46.2
The text was updated successfully, but these errors were encountered: