var cardText = document.querySelector( .store-pass-card-text )
var showMore = document.querySelector( .store-pass-show-more )
function toggleCardText() {
if (showMore.innerHTML == Show More ) {
showMore.innerHTML = Show Less
cardText.classList.add( store-pass-full-text )
}
else {
showMore.innerHTML = Show More
cardText.classList.remove( store-pass-full-text )
}
}
initText()
function initText() {
if (!checkOverflow(cardText)) return
showMore.classList.remove( d-none )
}
function checkOverflow(el) {
var curOverflow = el.style.overflow;
if (!curOverflow || curOverflow === visible ) el.style.overflow = hidden
var isOverflowing = el.clientWidth < el.scrollWidth || el.clientHeight < el.scrollHeight;
el.style.overflow = curOverflow;
return isOverflowing;
}
.store-pass-card-text {
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
height: 84px;
}
.store-pass-full-text {
-webkit-line-clamp: unset;
height: unset;
}
.store-pass-custom-description .mb-1, .my-1 {
margin-bottom: 0.375rem!important;
}
.store-pass-custom-description .mr-1, .mx-1 {
margin-right: 0.375rem!important;
}
.store-pass-custom-description .mr-1, .mx-1 {
margin-left: 0.375rem!important;
}
.store-pass-custom-description .d-none {
display: none!important;
}
.store-pass-custom-description .d-block {
display: block!important;
}
.store-pass-custom-description .row {
display: flex;
flex-wrap: wrap;
}
.store-pass-custom-description .col-6 {
flex: 0 0 50%;
max-width: 50%;
display: flex;
}
.store-pass-custom-description .legality {
margin-right: 1rem;
}
.store-pass-custom-description .labeled-info {
display: flex;
flex-direction: column;
}
.store-pass-custom-description .labeled-info > div {
border-bottom: 1px solid #e5e5e5;
margin-bottom: 1rem;
padding-bottom: 1rem;
}
.store-pass-custom-description .labeled-info > div:first-child {
padding-top: 1rem;
}
.store-pass-custom-description .labeled-info > div:last-child {
border-bottom: 0px;
padding-bottom: 0;
}
.store-pass-custom-description .labeled-info .inner {
display: flex;
padding: 0.25rem;
margin: 0.25rem;
border-bottom: 1px solid #e5e5e5;
}
.store-pass-custom-description .labeled-info .inner:first-child {
padding-top: 0.25rem;
}
.store-pass-custom-description .labeled-info .inner:last-child {
padding-bottom: 0;
border-bottom: 0;
}
.store-pass-custom-description .info-item {
display: flex;
align-items: center;
padding: 0.5rem;
margin: 0;
border-bottom: 1px solid #e5e5e5;
}
.store-pass-custom-description .info-item-description {
padding: 0.5rem;
}
.store-pass-custom-description .info-item-description label {
margin-right: 0.375rem;
}
.store-pass-custom-description .info-item label {
font-weight: 600;
flex: 0 0 120px;
margin-bottom: 0;
overflow-wrap: break-word;
align-self: flex-start;
}
.store-pass-custom-description .info-item .inner label {
flex: 0 0 200px;
}