From 1a599a55b9a372584c8b017c8b552279f8e077ec Mon Sep 17 00:00:00 2001 From: Erik Salhus Date: Mon, 2 Oct 2017 16:16:13 +0200 Subject: [PATCH] DIG-24399 Adding support for multiple vertical lines --- examples/accordion.html | 152 +++++++++++++++++++++++----------------- examples/examples.less | 8 ++- less/ffe-accordion.less | 27 ++++--- 3 files changed, 113 insertions(+), 74 deletions(-) diff --git a/examples/accordion.html b/examples/accordion.html index 2c9a5157e4..dac781d38a 100644 --- a/examples/accordion.html +++ b/examples/accordion.html @@ -32,31 +32,37 @@

Blå

  • -
    It is a long established fact that a reader will be distracted by @@ -74,11 +80,13 @@

    Blå

  • @@ -90,29 +98,35 @@

    Hvit

  • @@ -137,11 +151,13 @@

    Hvit

  • @@ -154,32 +170,38 @@

    Hvit med flere linjer

  • It is a long established fact that a reader will be distracted by @@ -197,11 +219,13 @@

    Hvit med flere linjer

  • diff --git a/examples/examples.less b/examples/examples.less index 21ef6c65c8..f424bc0d5a 100644 --- a/examples/examples.less +++ b/examples/examples.less @@ -1,4 +1,10 @@ @import "../node_modules/ffe-core/less/ffe"; @import "../less/ffe-accordion"; -@base-url: "."; \ No newline at end of file +@base-url: "."; + +button { + // Fixing margin-bug for visual tests + // https://stackoverflow.com/questions/13697150/textbox-and-button-top-margin-issue-for-firefox-and-chrome + vertical-align: bottom; +} \ No newline at end of file diff --git a/less/ffe-accordion.less b/less/ffe-accordion.less index 49f972717e..8462a954d8 100644 --- a/less/ffe-accordion.less +++ b/less/ffe-accordion.less @@ -64,23 +64,19 @@ } .ffe-accordion-item__title { + display: flex; + flex-flow: column; flex-grow: 1; } .ffe-accordion-item__toggler { + cursor: pointer; background-color: transparent; border: none; color: @ffe-blue-azure; - cursor: pointer; - display: flex; - flex-flow: row nowrap; - padding: 20px; - text-decoration: none; - text-align: left; - transition: - background-color @ffe-transition-duration @ffe-ease, - color @ffe-transition-duration @ffe-ease; width: 100%; + padding: 0; + margin: 0; &:hover, &:focus { @@ -119,3 +115,16 @@ } } } + +.ffe-accordion-item__toggler-content { + display: flex; + flex-flow: row nowrap; + padding: 20px; + text-decoration: none; + text-align: left; + transition: + background-color @ffe-transition-duration @ffe-ease, + color @ffe-transition-duration @ffe-ease; + width: 100%; + margin: 0; +}