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
a005b5dd
Commit
a005b5dd
authored
Nov 21, 2019
by
Robert Knight
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into sass-modules-migration
Fix conflicts in excerpt.scss
parents
b91add96
249b7b2b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
+12
-8
excerpt.js
src/sidebar/components/excerpt.js
+1
-1
excerpt-test.js
src/sidebar/components/test/excerpt-test.js
+1
-1
excerpt.scss
src/styles/sidebar/components/excerpt.scss
+10
-6
No files found.
src/sidebar/components/excerpt.js
View file @
a005b5dd
...
...
@@ -115,7 +115,7 @@ function Excerpt({
return
(
<
div
className
=
"excerpt"
style
=
{
contentStyle
}
>
<
div
test
-
name
=
"excerpt-
content"
ref
=
{
contentElement
}
>
<
div
className
=
"excerpt__
content"
ref
=
{
contentElement
}
>
{
children
}
<
/div
>
<
div
...
...
src/sidebar/components/test/excerpt-test.js
View file @
a005b5dd
...
...
@@ -53,7 +53,7 @@ describe('Excerpt', () => {
it
(
'renders content in container'
,
()
=>
{
const
wrapper
=
createExcerpt
();
const
contentEl
=
wrapper
.
find
(
'
[test-name="excerpt-content"]
'
);
const
contentEl
=
wrapper
.
find
(
'
.excerpt__content
'
);
assert
.
include
(
contentEl
.
html
(),
'default content'
);
});
...
...
src/styles/sidebar/components/excerpt.scss
View file @
a005b5dd
@use
"../../variables"
as
var
;
// FIXME - Remove the `@at-root` here when SASS modules are used, as local
// variables will no longer be exposed to other modules.
@at-root
{
$expand-duration
:
0
.15s
;
// the truncated body of the <excerpt>
.excerpt
{
transition
:
max-height
$expand-duration
ease-in
;
overflow
:
hidden
;
position
:
relative
;
}
// a container which wraps the <excerpt> and contains the excerpt
// itself plus the shadow at the bottom that can be clicked to expand or
// collapse it
.excerpt__container
{
position
:
relative
;
.excerpt__content
{
// Create a new block-formatting context. This prevents any margins on
// elements inside the excerpt from "leaking out" due to margin-collapsing,
// which would push this container element away from the top of the excerpt.
//
// See https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context
// and https://github.com/hypothesis/client/issues/1518.
display
:
inline-block
;
}
// inline controls for expanding and collapsing
...
...
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