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
17b20e61
Commit
17b20e61
authored
Jun 24, 2020
by
Lyza Danger Gardner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract style patterns from AnnotationBody
parent
30c2c018
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
25 deletions
+16
-25
annotation-body.js
src/sidebar/components/annotation-body.js
+0
-1
layout.scss
src/styles/mixins/layout.scss
+10
-0
molecules.scss
src/styles/mixins/molecules.scss
+3
-23
annotation-body.scss
src/styles/sidebar/components/annotation-body.scss
+3
-1
No files found.
src/sidebar/components/annotation-body.js
View file @
17b20e61
...
@@ -50,7 +50,6 @@ export default function AnnotationBody({
...
@@ -50,7 +50,6 @@ export default function AnnotationBody({
textClass
=
{{
textClass
=
{{
'annotation-body__text'
:
true
,
'annotation-body__text'
:
true
,
'is-hidden'
:
isHidden
(
annotation
),
'is-hidden'
:
isHidden
(
annotation
),
'has-content'
:
text
.
length
>
0
,
}}
}}
/
>
/
>
<
/Excerpt
>
<
/Excerpt
>
...
...
src/styles/mixins/layout.scss
View file @
17b20e61
...
@@ -78,3 +78,13 @@
...
@@ -78,3 +78,13 @@
margin-top
:
var
.
$layout-margin
;
margin-top
:
var
.
$layout-margin
;
}
}
}
}
/**
* Establish vertical space outside of elements in the container
*
* @param $size [var.$layout-margin--medium]: Spacing size (padding)
*/
@mixin
vertical-space
(
$size
:
var
.
$layout-margin--medium
)
{
padding-top
:
$size
;
padding-bottom
:
$size
;
}
src/styles/mixins/molecules.scss
View file @
17b20e61
...
@@ -67,29 +67,9 @@
...
@@ -67,29 +67,9 @@
* A pattern for displaying redacted (moderated) text content
* A pattern for displaying redacted (moderated) text content
*/
*/
@mixin
redacted-content
{
@mixin
redacted-content
{
// Hidden annotations displayed to moderators, where the content is still
text-decoration
:
line-through
;
// present.
// Make any images within this content greyscale, and low-contrast
&
.has-content
{
filter
:
grayscale
(
100%
)
contrast
(
65%
);
text-decoration
:
line-through
;
filter
:
grayscale
(
100%
)
contrast
(
65%
);
}
// Hidden annotations displayed to non-moderators, where the content has been
// filtered out by the service.
&
:not
(
.has-content
)
{
// Create a column of horizontal stripes, giving the impression of text
// underneath that has been censored.
display
:
block
;
height
:
60px
;
width
:
100vw
;
background
:
repeating-linear-gradient
(
to
bottom
,
var
.
$grey-2
,
var
.
$grey-2
15px
,
white
15px
,
white
20px
);
}
}
}
/**
/**
...
...
src/styles/sidebar/components/annotation-body.scss
View file @
17b20e61
...
@@ -11,10 +11,12 @@
...
@@ -11,10 +11,12 @@
.annotation-body__collapse-toggle
{
.annotation-body__collapse-toggle
{
@include
layout
.
row
(
right
);
@include
layout
.
row
(
right
);
margin
:
var
.
$layout-margin--small
0
;
@include
layout
.
vertical-space
(
var
.
$layout-margin--small
)
;
.annotation-body__collapse-toggle-button
{
.annotation-body__collapse-toggle-button
{
@include
buttons
.
button--labeled
;
@include
buttons
.
button--labeled
;
// The button should not have a background color except when hovered/active:
// It should look like text only
background-color
:
transparent
;
background-color
:
transparent
;
}
}
}
}
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