Skip to content
Snippets Groups Projects
Commit c98d5522 authored by Konstantinos Platis's avatar Konstantinos Platis
Browse files

Resolve "Preview card text overflows when there is an icon"

parent 70fa11aa
No related branches found
No related tags found
2 merge requests!10Update dev with latest version of master,!9Update dev branch with latest version of master
...@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. ...@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [2.2.2] - 16-01-2019
### Fixed
- Overflowing text in Preview Cards when the card had icon
## [2.2.1] - 10-12-2018 ## [2.2.1] - 10-12-2018
### Fixed ### Fixed
- Added styling for "+More" link in mega menu - Added styling for "+More" link in mega menu
......
...@@ -2,7 +2,7 @@ name: "CERN Components" ...@@ -2,7 +2,7 @@ name: "CERN Components"
type: module type: module
description: "Provides all the necessary modules regarding CERN Web Components." description: "Provides all the necessary modules regarding CERN Web Components."
core: 8.x core: 8.x
version: 2.2.1 version: 2.2.2
package: CERN Components package: CERN Components
dependencies: dependencies:
- components:components (>=8.x-1.1-alpha1) - components:components (>=8.x-1.1-alpha1)
......
...@@ -87,6 +87,11 @@ ...@@ -87,6 +87,11 @@
.component-preview-cards .component-preview-cards__category-icon-vocabulary { .component-preview-cards .component-preview-cards__category-icon-vocabulary {
margin: 0 auto; margin: 0 auto;
text-align: center; } text-align: center; }
.component-preview-cards .component-preview-cards__category-icon-vocabulary ~ .preview-card__title h3 a span {
display: inline-block;
white-space: normal;
overflow: hidden;
text-overflow: ellipsis; }
.component-preview-cards .component-preview-cards__category-icon-vocabulary:before { .component-preview-cards .component-preview-cards__category-icon-vocabulary:before {
content: attr(data-icon); content: attr(data-icon);
color: white; color: white;
...@@ -97,10 +102,6 @@ ...@@ -97,10 +102,6 @@
font-size: 60px; font-size: 60px;
position: relative; position: relative;
top: -10px; } top: -10px; }
.component-preview-cards .component-preview-cards__category-icon-vocabulary + .preview-card__title h3 a span {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis; }
.component-preview-cards .preview-card { .component-preview-cards .preview-card {
width: 100%; } width: 100%; }
.component-preview-cards .preview-card__title { .component-preview-cards .preview-card__title {
...@@ -119,7 +120,6 @@ ...@@ -119,7 +120,6 @@
position: relative; position: relative;
line-height: 26px !important; } line-height: 26px !important; }
.component-preview-cards .preview-card__title h3 a span { .component-preview-cards .preview-card__title h3 a span {
display: block;
width: 100%; } width: 100%; }
.component-preview-cards .preview-card__title h3 a:hover { .component-preview-cards .preview-card__title h3 a:hover {
text-decoration: none; } text-decoration: none; }
......
...@@ -95,6 +95,22 @@ ...@@ -95,6 +95,22 @@
.component-preview-cards__category-icon-vocabulary { .component-preview-cards__category-icon-vocabulary {
margin: 0 auto; margin: 0 auto;
text-align: center; text-align: center;
& ~ .preview-card{
&__title{
h3{
a{
span{
display: inline-block;
white-space: normal;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
}
}
&:before { &:before {
content: attr(data-icon); content: attr(data-icon);
color: white; color: white;
...@@ -113,9 +129,9 @@ ...@@ -113,9 +129,9 @@
h3{ h3{
a{ a{
span{ span{
white-space: nowrap; //white-space: nowrap;
overflow: hidden; //overflow: hidden;
text-overflow: ellipsis; //text-overflow: ellipsis;
} }
} }
} }
...@@ -140,7 +156,7 @@ ...@@ -140,7 +156,7 @@
position: relative; position: relative;
line-height: 26px !important; line-height: 26px !important;
span { span {
display: block; //display: block;
width: 100%; width: 100%;
//white-space: normal; //white-space: normal;
//overflow: hidden; //overflow: hidden;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment