25.06.2018 Views

Full-Stack Vue.js 2 and Laravel 5

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

We'll also put a button after the p tag that the user can click to exp<strong>and</strong> the section<br />

to full height.<br />

index.html: About this listing {{ about }} + More<br />

<br />

Here's the CSS that's needed, including a generic button rule that will provide<br />

base styling for all buttons that we'll add throughout the project.<br />

style.css: button { text-align: center; vertical-align: middle; user-select: none;<br />

white-space: nowrap; cursor: pointer; display: inline-block; margin-bottom: 0; }<br />

.about button.more { background: transparent; border: 0; color: #008489;<br />

padding: 0; font-size: 17px; font-weight: bold; } .about button.more:hover,<br />

.about button.more:focus, .about button.more:active { text-decoration: underline;<br />

outline: none; }<br />

To make this work, we need a way to remove the contracted class when the user<br />

clicks the More button. Seems like a good job for directives!

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!