Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
9bf7390e
Commit
9bf7390e
authored
Sep 25, 2017
by
ninabreznik
Committed by
yann300
Oct 04, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updating style guide and working on concept
parent
223bf727
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
10 deletions
+45
-10
style-guide.js
src/ui/styles/style-guide.js
+45
-10
No files found.
src/ui/styles/style-guide.js
View file @
9bf7390e
...
@@ -19,11 +19,26 @@ function styleGuide () {
...
@@ -19,11 +19,26 @@ function styleGuide () {
icon_Color
:
'hsl(0, 0%, 0%)'
,
// black
icon_Color
:
'hsl(0, 0%, 0%)'
,
// black
icon_HoverColor
:
'hsla(44, 100%, 50%, 1)'
,
// orange
icon_HoverColor
:
'hsla(44, 100%, 50%, 1)'
,
// orange
//
DROPDOWN
//
UI ELEMENTS
dropdown
_TextColor
:
'hsl(0, 0%, 0%)'
,
// black ,
element
_TextColor
:
'hsl(0, 0%, 0%)'
,
// black ,
dropdown
_BackgroundColor
:
'hsl(0, 0%, 100%)'
,
// white
element
_BackgroundColor
:
'hsl(0, 0%, 100%)'
,
// white
dropdown
_BorderColor
:
'hsla(0, 0%, 40%, .2)'
,
// very light grey
element
_BorderColor
:
'hsla(0, 0%, 40%, .2)'
,
// very light grey
/*
1. most css properties can take many or infinite amounf of different values
=> so we define a set of concrete values that we use:
- variable just for plain colors (later also fonts, widths, paddings, border radiuses...)
2. we define certain semantic names that make sense in the context of our app
=> so we can use the values used in (1.) e.g. like 'color_red' and assign it to e.g.
- highlightColor: color_red
- borderColor: color_white
- ...
3. we define a nested object that represents the component hierarchy that
makes up our app and use semantic names defined under (2.)
*/
// BASIC COLORS (B&W and transparent)
// BASIC COLORS (B&W and transparent)
transparent
:
'transparent'
,
transparent
:
'transparent'
,
...
@@ -54,6 +69,25 @@ function styleGuide () {
...
@@ -54,6 +69,25 @@ function styleGuide () {
violet
:
'hsla(240, 64%, 68%, 1)'
violet
:
'hsla(240, 64%, 68%, 1)'
}
}
var
elementColors
=
{
/* -----------------------
BUTTONS
----------------------- */
// DROPDOWN
dropdown_TextColor
:
colors
.
element_TextColor
,
dropdown_BackgroundColor
:
colors
.
element_BackgroundColor
,
dropdown_BorderColor
:
colors
.
element_BorderColor
,
// BUTTON
button_TextColor
:
colors
.
element_TextColor
,
button_BorderColor
:
colors
.
element_BorderColor
,
rightPanel_compileTab_compileButton_BackgroundColor
:
'hsla(0, 0%, 40%, .2)'
,
rightPanel_compileTab_otherButtons_BackgroundColor
:
'hsla(0, 0%, 40%, .2)'
/* -----------------------
TEXT BOXES
----------------------- */
}
/* --------------------------------------------------------------------------
/* --------------------------------------------------------------------------
TEXT-BOXES
TEXT-BOXES
-------------------------------------------------------------------------- */
-------------------------------------------------------------------------- */
...
@@ -98,12 +132,13 @@ function styleGuide () {
...
@@ -98,12 +132,13 @@ function styleGuide () {
var
buttons
=
{
var
buttons
=
{
'button'
:
`
'button'
:
`
background-color :
${
elementColors
.
button_BackgroundColor
}
;
border : .3px solid
${
elementColors
.
button_BorderColor
}
;
color :
${
elementColors
.
button_TextColor
}
;
display : flex;
display : flex;
align-items : center;
align-items : center;
justify-content : center;
justify-content : center;
border-color : transparent;
border-radius : 3px;
border-radius : 3px;
border : .3px solid
${
colors
.
veryLightGrey
}
;
cursor : pointer;
cursor : pointer;
min-height : 25px;
min-height : 25px;
max-height : 25px;
max-height : 25px;
...
@@ -112,7 +147,6 @@ function styleGuide () {
...
@@ -112,7 +147,6 @@ function styleGuide () {
font-size : 12px;
font-size : 12px;
overflow : hidden;
overflow : hidden;
word-break : normal;
word-break : normal;
background-color : #E8E8E8;
`
,
`
,
'button:hover'
:
`
'button:hover'
:
`
...
@@ -120,9 +154,9 @@ function styleGuide () {
...
@@ -120,9 +154,9 @@ function styleGuide () {
`
,
`
,
'dropdown'
:
`
'dropdown'
:
`
color :
${
c
olors
.
dropdown_TextColor
}
;
color :
${
elementC
olors
.
dropdown_TextColor
}
;
background-color :
${
c
olors
.
dropdown_BackgroundColor
}
;
background-color :
${
elementC
olors
.
dropdown_BackgroundColor
}
;
border : 1px solid
${
c
olors
.
dropdown_BorderColor
}
;
border : 1px solid
${
elementC
olors
.
dropdown_BorderColor
}
;
font-size : 12px;
font-size : 12px;
font-weight : bold;
font-weight : bold;
padding : 0 8px;
padding : 0 8px;
...
@@ -140,6 +174,7 @@ function styleGuide () {
...
@@ -140,6 +174,7 @@ function styleGuide () {
return
{
return
{
colors
:
colors
,
colors
:
colors
,
elementColors
:
elementColors
,
dropdown
:
buttons
[
'dropdown'
],
dropdown
:
buttons
[
'dropdown'
],
button
:
buttons
[
'button'
],
button
:
buttons
[
'button'
],
inputField
:
textBoxes
[
'input'
],
inputField
:
textBoxes
[
'input'
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment