Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
b9663d45
Unverified
Commit
b9663d45
authored
Jul 01, 2020
by
Lyza Gardner
Committed by
GitHub
Jul 01, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2292 from hypothesis/refactor-spacing-scale
Adjust the scale of layout spacing
parents
703cdd00
2f7b17b1
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
41 additions
and
34 deletions
+41
-34
layout.scss
src/styles/mixins/layout.scss
+11
-1
molecules.scss
src/styles/mixins/molecules.scss
+1
-1
annotation-body.scss
src/styles/sidebar/components/annotation-body.scss
+1
-1
annotation-header.scss
src/styles/sidebar/components/annotation-header.scss
+1
-1
annotation-license.scss
src/styles/sidebar/components/annotation-license.scss
+2
-2
annotation-publish-control.scss
...styles/sidebar/components/annotation-publish-control.scss
+3
-6
annotation-share-control.scss
src/styles/sidebar/components/annotation-share-control.scss
+2
-2
focused-mode-header.scss
src/styles/sidebar/components/focused-mode-header.scss
+1
-1
selection-tabs.scss
src/styles/sidebar/components/selection-tabs.scss
+1
-1
tag-editor.scss
src/styles/sidebar/components/tag-editor.scss
+6
-6
tag-list.scss
src/styles/sidebar/components/tag-list.scss
+3
-3
thread.scss
src/styles/sidebar/components/thread.scss
+1
-1
toast-messages.scss
src/styles/sidebar/components/toast-messages.scss
+1
-1
top-bar.scss
src/styles/sidebar/components/top-bar.scss
+2
-2
tutorial.scss
src/styles/sidebar/components/tutorial.scss
+1
-1
variables.scss
src/styles/variables.scss
+4
-4
No files found.
src/styles/mixins/layout.scss
View file @
b9663d45
...
...
@@ -82,7 +82,7 @@
}
/**
* Establish vertical space outside of elements in the container
* Establish vertical space outside of elements
with
in the container
*
* @param $size [var.$layout-space--medium]: Spacing size (padding)
*/
...
...
@@ -90,3 +90,13 @@
padding-top
:
$size
;
padding-bottom
:
$size
;
}
/**
* Establish horizontal space outside of elements within the container
*
* @param $size [var.$layout-space--medium]: Spacing size (padding)
*/
@mixin
horizontal-space
(
$size
:
var
.
$layout-space--medium
)
{
padding-left
:
$size
;
padding-right
:
$size
;
}
src/styles/mixins/molecules.scss
View file @
b9663d45
...
...
@@ -103,7 +103,7 @@
}
&
__header-icon
{
margin-right
:
var
.
$layout-space--small
;
margin-right
:
var
.
$layout-space--
x
small
;
}
&
__title
{
...
...
src/styles/sidebar/components/annotation-body.scss
View file @
b9663d45
...
...
@@ -11,7 +11,7 @@
.annotation-body__collapse-toggle
{
@include
layout
.
row
(
right
);
@include
layout
.
vertical-space
(
var
.
$layout-space--small
);
@include
layout
.
vertical-space
(
var
.
$layout-space--
x
small
);
.annotation-body__collapse-toggle-button
{
@include
buttons
.
button--labeled
;
...
...
src/styles/sidebar/components/annotation-header.scss
View file @
b9663d45
...
...
@@ -19,7 +19,7 @@
&
__reply-toggle
{
@include
buttons
.
button--link
;
padding
:
0
var
.
$layout-space--small
;
padding
:
0
var
.
$layout-space--
x
small
;
}
// Timestamps are right aligned in a flex row
...
...
src/styles/sidebar/components/annotation-license.scss
View file @
b9663d45
...
...
@@ -6,7 +6,7 @@
@include
utils
.
font--small
;
@include
utils
.
border-top
;
// Space between border and text content
padding-top
:
var
.
$layout-space--small
;
padding-top
:
var
.
$layout-space--
x
small
;
// Container with two icons (representing CC licenses)
// with a very small amount of spacing between them
...
...
@@ -14,6 +14,6 @@
@include
layout
.
row
;
@include
layout
.
horizontal-rhythm
(
1px
);
// Add space before text
margin-right
:
var
.
$layout-space--xsmall
;
margin-right
:
var
.
$layout-space--x
x
small
;
}
}
src/styles/sidebar/components/annotation-publish-control.scss
View file @
b9663d45
...
...
@@ -10,8 +10,7 @@
&
__cancel-button
{
@include
buttons
.
button--labeled
;
// TODO: Magic number
padding
:
0
.75em
;
padding
:
var
.
$layout-space--small
;
}
}
...
...
@@ -36,8 +35,7 @@
&
__primary
{
@include
buttons
.
button--primary
;
// TODO magic number
padding
:
0
.75em
;
padding
:
var
.
$layout-space--small
;
// Turn off right-side border radius for alignment with menu label/button
border-top-right-radius
:
0
;
...
...
@@ -48,12 +46,11 @@
// when clicked
&
__menu-label
{
@include
layout
.
row
(
center
);
@include
layout
.
horizontal-space
(
var
.
$layout-space--small
);
color
:
var
.
$color-text-inverted
;
background-color
:
var
.
$grey-mid
;
// Make sure label element takes up full available vertical space
height
:
100%
;
// TODO magic number
padding
:
0
0
.75em
;
// Add border radius to the right to match the left side of the primary button
border-top-right-radius
:
var
.
$border-radius
;
...
...
src/styles/sidebar/components/annotation-share-control.scss
View file @
b9663d45
...
...
@@ -19,7 +19,7 @@
&
__icon-button
{
@include
buttons
.
button--input
;
padding
:
var
.
$layout-space--x
small
var
.
$layout-space--
small
;
padding
:
var
.
$layout-space--x
xsmall
var
.
$layout-space--x
small
;
}
&
__form-input
{
...
...
@@ -30,7 +30,7 @@
&
__permissions
{
@include
utils
.
font--small
;
margin
:
var
.
$layout-space--small
0
;
margin
:
var
.
$layout-space--
x
small
0
;
}
&
__arrow
{
...
...
src/styles/sidebar/components/focused-mode-header.scss
View file @
b9663d45
...
...
@@ -17,7 +17,7 @@
font-weight
:
300
;
// TODO cleanup
padding
:
var
.
$layout-space--small
;
padding
:
var
.
$layout-space--
x
small
;
margin-bottom
:
var
.
$layout-space
;
&
__btn
{
...
...
src/styles/sidebar/components/selection-tabs.scss
View file @
b9663d45
...
...
@@ -21,7 +21,7 @@
.selection-tabs__icon
{
color
:
var
.
$grey-mid
;
margin
:
0
var
.
$layout-space--xsmall
;
margin
:
0
var
.
$layout-space--x
x
small
;
}
.selection-tabs--theme-clean
{
...
...
src/styles/sidebar/components/tag-editor.scss
View file @
b9663d45
...
...
@@ -5,7 +5,7 @@
@use
"../../variables"
as
var
;
.tag-editor
{
margin
:
var
.
$layout-space--small
0
;
margin
:
var
.
$layout-space--
x
small
0
;
&
__input
{
@include
forms
.
form-input
;
...
...
@@ -15,13 +15,13 @@
&
__tags
{
@include
layout
.
row
;
flex-wrap
:
wrap
;
margin
:
var
.
$layout-space--small
0
;
margin
:
var
.
$layout-space--
x
small
0
;
}
&
__item
{
@include
layout
.
row
;
margin
:
var
.
$layout-space--x
small
var
.
$layout-space--
small
var
.
$layout-space--small
0
;
margin
:
var
.
$layout-space--x
xsmall
var
.
$layout-space--x
small
var
.
$layout-space--
x
small
0
;
}
&
__edit
{
...
...
@@ -30,7 +30,7 @@
background
:
var
.
$grey-1
;
border-radius
:
var
.
$border-radius
0
0
var
.
$border-radius
;
border-right-width
:
0
;
padding
:
2px
var
.
$layout-space--small
;
padding
:
2px
var
.
$layout-space--
x
small
;
}
&
__delete
{
...
...
@@ -38,7 +38,7 @@
@include
utils
.
border
;
color
:
var
.
$grey-mid
;
background-color
:
var
.
$grey-1
;
padding
:
0
var
.
$layout-space--small
;
padding
:
0
var
.
$layout-space--
x
small
;
border-radius
:
0
var
.
$border-radius
var
.
$border-radius
0
;
&
:hover
{
...
...
src/styles/sidebar/components/tag-list.scss
View file @
b9663d45
...
...
@@ -9,9 +9,9 @@
&
__item
{
@include
utils
.
border
;
margin
:
var
.
$layout-space--x
small
var
.
$layout-space--
small
var
.
$layout-space--xsmall
0
;
padding
:
2px
var
.
$layout-space--small
;
margin
:
var
.
$layout-space--x
xsmall
var
.
$layout-space--x
small
var
.
$layout-space--x
x
small
0
;
padding
:
2px
var
.
$layout-space--
x
small
;
background
:
var
.
$grey-0
;
border-radius
:
var
.
$border-radius
;
}
...
...
src/styles/sidebar/components/thread.scss
View file @
b9663d45
...
...
@@ -6,7 +6,7 @@
@include
layout
.
row
;
&
--reply
{
margin-top
:
var
.
$layout-space--small
;
margin-top
:
var
.
$layout-space--
x
small
;
}
&
--reply
&
__content
{
...
...
src/styles/sidebar/components/toast-messages.scss
View file @
b9663d45
...
...
@@ -8,7 +8,7 @@
z-index
:
1
;
left
:
0
;
width
:
100%
;
padding
:
0
var
.
$layout-space--small
;
padding
:
0
var
.
$layout-space--
x
small
;
@include
responsive
.
tablet-and-up
{
// When displaying in a wider viewport (desktop/tablet outside of sidebar)
...
...
src/styles/sidebar/components/top-bar.scss
View file @
b9663d45
...
...
@@ -52,7 +52,7 @@
}
&
__menu-label
{
padding
:
var
.
$layout-space--xsmall
;
padding
:
var
.
$layout-space--x
x
small
;
}
}
...
...
@@ -63,7 +63,7 @@
.top-bar__login-button
{
@include
buttons
.
button
;
@include
utils
.
font--large
;
padding
:
0
var
.
$layout-space--xsmall
;
padding
:
0
var
.
$layout-space--x
x
small
;
color
:
var
.
$color-brand
;
&
:hover
{
...
...
src/styles/sidebar/components/tutorial.scss
View file @
b9663d45
...
...
@@ -4,7 +4,7 @@
.tutorial
{
&
__list
{
@include
layout
.
vertical-rhythm
(
var
.
$layout-space--small
);
@include
layout
.
vertical-rhythm
(
var
.
$layout-space--
x
small
);
}
&
__icon
{
...
...
src/styles/variables.scss
View file @
b9663d45
...
...
@@ -80,12 +80,12 @@ $line-height: 1.4;
// this, iOS will zoom into the field when focused.
$touch-input-font-size
:
16px
;
// Layout
margins
// Layout
spacing
// -------------------------
$layout-h-margin
:
15px
;
// Legacy
$layout-space
:
1em
;
$layout-space--xsmall
:
$layout-space
/
4
;
$layout-space--small
:
$layout-space
/
2
;
$layout-space--xxsmall
:
$layout-space
*
(
1
/
4
);
$layout-space--xsmall
:
$layout-space
*
(
1
/
2
);
$layout-space--small
:
$layout-space
*
(
3
/
4
);
$layout-space--medium
:
$layout-space
;
// Minimum recommended size for tap targets on mobile.
...
...
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