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
4c809500
Commit
4c809500
authored
Jun 19, 2020
by
Lyza Danger Gardner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract redacted-content pattern into molecules
parent
ff34312e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
22 deletions
+32
-22
molecules.scss
src/styles/mixins/molecules.scss
+29
-0
annotation-body.scss
src/styles/sidebar/components/annotation-body.scss
+3
-22
No files found.
src/styles/mixins/molecules.scss
View file @
4c809500
...
...
@@ -21,3 +21,32 @@
}
}
}
/**
* A pattern for displaying redacted (moderated) text content
*/
@mixin
redacted-content
{
// Hidden annotations displayed to moderators, where the content is still
// present.
&
.has-content
{
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 @
4c809500
@use
'../../variables'
as
var
;
@use
"../../mixins/buttons"
;
@use
"../../mixins/layout"
;
@use
"../../mixins/molecules"
;
.annotation-body__text
{
// Hidden annotations displayed to moderators, where the content is still
// present.
&
.is-hidden.has-content
{
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.
&
.is-hidden
: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
);
&
.is-hidden
{
@include
molecules
.
redacted-content
;
}
}
...
...
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