Commit a005b5dd authored by Robert Knight's avatar Robert Knight

Merge branch 'master' into sass-modules-migration

Fix conflicts in excerpt.scss
parents b91add96 249b7b2b
...@@ -115,7 +115,7 @@ function Excerpt({ ...@@ -115,7 +115,7 @@ function Excerpt({
return ( return (
<div className="excerpt" style={contentStyle}> <div className="excerpt" style={contentStyle}>
<div test-name="excerpt-content" ref={contentElement}> <div className="excerpt__content" ref={contentElement}>
{children} {children}
</div> </div>
<div <div
......
...@@ -53,7 +53,7 @@ describe('Excerpt', () => { ...@@ -53,7 +53,7 @@ describe('Excerpt', () => {
it('renders content in container', () => { it('renders content in container', () => {
const wrapper = createExcerpt(); const wrapper = createExcerpt();
const contentEl = wrapper.find('[test-name="excerpt-content"]'); const contentEl = wrapper.find('.excerpt__content');
assert.include(contentEl.html(), 'default content'); assert.include(contentEl.html(), 'default content');
}); });
......
@use "../../variables" as var; @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 { @at-root {
$expand-duration: 0.15s; $expand-duration: 0.15s;
// the truncated body of the <excerpt>
.excerpt { .excerpt {
transition: max-height $expand-duration ease-in; transition: max-height $expand-duration ease-in;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
} }
// a container which wraps the <excerpt> and contains the excerpt .excerpt__content {
// itself plus the shadow at the bottom that can be clicked to expand or // Create a new block-formatting context. This prevents any margins on
// collapse it // elements inside the excerpt from "leaking out" due to margin-collapsing,
.excerpt__container { // which would push this container element away from the top of the excerpt.
position: relative; //
// 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 // inline controls for expanding and collapsing
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment