Skip to content

Commit

Permalink
T360286: Sections style updates (#127)
Browse files Browse the repository at this point in the history
* Fix footer and add min-height to preview

* Fix header title text overflow

* Update header styling

* Update list item style

* Only one close icon for views
  • Loading branch information
medied authored Jun 25, 2024
1 parent 429e1e5 commit 1eb640a
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 18 deletions.
3 changes: 0 additions & 3 deletions src/link/images/close-language.svg

This file was deleted.

3 changes: 3 additions & 0 deletions src/link/images/close-view.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion src/link/sections.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ export const Sections = ( {
return (
<div className={ `${ sectionsPrefix }` }>
<div className={ `${ sectionsPrefix }-header` }>
{ titleWithoutSection( activeAttributes.title ) }
<div className={ `${ sectionsPrefix }-header-title` }>
{ titleWithoutSection( activeAttributes.title ) }
</div>
<div
className={ `${ sectionsPrefix }-header-close` }
onClick={ () => setSelectingSection( false ) }
Expand Down
55 changes: 41 additions & 14 deletions src/link/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ body {
line-height: 19.55px;

&-close {
background-image: url(./images/close-language.svg);
background-image: url(./images/close-view.svg);
width: 20px;
height: 20px;
cursor: pointer;
Expand Down Expand Up @@ -352,6 +352,7 @@ body {

.wikipediapreview-edit-preview {
width: 350px;
min-height: 214px;

&-container {
display: flex;
Expand Down Expand Up @@ -420,20 +421,36 @@ body {
box-shadow: none;

.wikipediapreview-footer {
position: relative;
display: flex;
align-items: center;
justify-content: center;
height: 40px;
z-index: 5;

&-cta-readmore {
display: none;
}
&-link {
margin-right: 5px;

&-cta {
text-decoration: none;
font-size: 14px;
color: #36c;
margin-right: 4px;

&-cta-readonwiki {
display: block;
&:hover {
text-decoration: underline;
}

&:visited {
color: #6B4BA1;
svg path {
fill: #6B4BA1;
}
}
}
}
}
}

.wikipediapreview-body::after {
content: none;
}
}

&.is-expanded {
Expand Down Expand Up @@ -544,14 +561,24 @@ body {
min-height: 70px;
display: flex;
align-items: center;
padding: 0 10px 0 10px;
padding: 0 16px 0 16px;
font-size: 16px;
font-weight: bold;
border-bottom: 1px solid #c8ccd1;
justify-content: space-between;

&-title {
max-width: 90%;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
color: #202122
}

&-close {
background-image: url(./images/close-language.svg);
background-image: url(./images/close-view.svg);
width: 20px;
height: 20px;
cursor: pointer;
Expand All @@ -565,8 +592,8 @@ body {
&-item {
display: flex;
align-items: center;
padding: 5px;
margin: 5px;
padding: 4px;
margin: 8px;

&-content {
display: flex;
Expand Down

0 comments on commit 1eb640a

Please sign in to comment.