From b6f895fde6f6b7cf400d5173fff50902668342e4 Mon Sep 17 00:00:00 2001 From: David Polak Date: Fri, 4 Jan 2019 13:52:13 +0100 Subject: [PATCH] Add align-items --- src/editor/config/config.js | 1 + src/style_manager/model/PropertyFactory.js | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/editor/config/config.js b/src/editor/config/config.js index 2599cbfe0..3dc9f056e 100644 --- a/src/editor/config/config.js +++ b/src/editor/config/config.js @@ -219,6 +219,7 @@ module.exports = { 'flex-direction', 'flex-wrap', 'justify-content', + 'align-items', 'position', 'top', 'right', diff --git a/src/style_manager/model/PropertyFactory.js b/src/style_manager/model/PropertyFactory.js index f05e4d995..73a41ddd6 100644 --- a/src/style_manager/model/PropertyFactory.js +++ b/src/style_manager/model/PropertyFactory.js @@ -75,6 +75,7 @@ module.exports = () => ({ case 'flex-direction': case 'flex-wrap': case 'justify-content': + case 'align-items': case 'font-family': case 'font-weight': case 'border-style': @@ -178,6 +179,9 @@ module.exports = () => ({ case 'justify-content': obj.defaults = 'flex-start'; break; + case 'align-items': + obj.defaults = 'stretch'; + break; case 'position': obj.defaults = 'static'; break; @@ -293,6 +297,7 @@ module.exports = () => ({ case 'flex-direction': case 'flex-wrap': case 'justify-content': + case 'align-items': obj.requires = { display: ['flex'] }; break; } @@ -463,6 +468,15 @@ module.exports = () => ({ { value: 'space-evenly' } ]; break; + case 'align-items': + obj.list = [ + { value: 'flex-start' }, + { value: 'flex-end' }, + { value: 'center' }, + { value: 'baseline' }, + { value: 'stretch' } + ]; + break; case 'position': obj.list = [ { value: 'static' },