Skip to content
Snippets Groups Projects
Commit 871ba642 authored by Jessie Keck's avatar Jessie Keck
Browse files

Update gallery theming.

- Removed scale transform
- Adds transparent border to highlighting doesn't cause jumps.
- Makes images a fixed height
- Fits the thumbnail + caption container around the content using width: min-content
- Uses flex-box for the gallery items for better x-browser compatibility
parent 9a00105c
Branches
Tags
No related merge requests found
......@@ -32,7 +32,7 @@ export class GalleryView extends Component {
className={
classNames(
classes.galleryViewItem,
canvas.index === window.canvasIndex ? classes.currentCanvas : '',
canvas.index === window.canvasIndex ? classes.galleryViewItemCurrent : '',
)
}
onClick={() => setCanvas(window.id, canvas.index)}
......@@ -44,7 +44,6 @@ export class GalleryView extends Component {
imageUrl={manifestoCanvas.thumbnail(null, 100)}
isValid={manifestoCanvas.hasValidDimensions}
maxHeight={120}
maxWidth={100}
aspectRatio={manifestoCanvas.aspectRatio}
style={{ margin: '0 auto' }}
/>
......
......@@ -21,15 +21,14 @@ const mapStateToProps = (state, { window }) => (
* Styles to be passed to the withStyles HOC
*/
const styles = theme => ({
currentCanvas: {
border: `2px solid ${theme.palette.secondary.main}`,
padding: theme.spacing.unit / 2,
},
galleryContainer: {
flex: '1',
alignItems: 'flex-start',
flexDirection: 'row',
flexWrap: 'wrap',
overflowX: 'hidden',
overflowY: 'scroll',
padding: '50px 0 50px 20px',
width: '100%',
},
galleryViewItem: {
'&:focus': {
......@@ -37,20 +36,19 @@ const styles = theme => ({
},
'&:hover': {
border: `2px solid ${theme.palette.secondary.main}`,
padding: theme.spacing.unit / 2,
transform: 'scale(1.05)',
transition: '.1s transform ease-out',
},
boxSizing: 'border-box',
border: '2px solid transparent',
cursor: 'pointer',
display: 'inline-block',
height: '160px',
height: '165px',
margin: `${theme.spacing.unit}px ${theme.spacing.unit / 2}px`,
maxWidth: '100px',
minWidth: '60px',
overflow: 'hidden',
padding: theme.spacing.unit / 2,
textOverflow: 'elipsis',
transition: '.1s transform ease-out',
width: 'min-content',
},
galleryViewItemCurrent: {
border: `2px solid ${theme.palette.secondary.main}`,
},
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment