Sha256: 8507c6c4c8dac073dfafbfab64b88bff9d6226cf92aa3f9d20949863acbc4edf

Contents?: true

Size: 1.06 KB

Versions: 9

Compression:

Stored size: 1.06 KB

Contents

require "spec_helper"

describe "hide-visually" do
  before(:all) do
    ParserSupport.parse_file("library/hide-visually")
  end

  context "called on element" do
    it "adds properties to hide the element" do
      ruleset = "border: 0; " +
                "clip: rect(1px, 1px, 1px, 1px); " +
                "clip-path: inset(100%); " +
                "height: 1px; " +
                "overflow: hidden; " +
                "padding: 0; " +
                "position: absolute; " +
                "white-space: nowrap; " +
                "width: 1px;"

      expect(".hide-visually").to have_ruleset(ruleset)
    end
  end

  context "called with unhide argument" do
    it "adds properties to reverse the hiding of the element" do
      ruleset = "clip: auto; " +
                "clip-path: none; " +
                "height: auto; " +
                "overflow: visible; " +
                "position: static; " +
                "white-space: inherit; " +
                "width: auto;"

      expect(".hide-visually--unhide").to have_ruleset(ruleset)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
bourbon-7.3.0 spec/bourbon/library/hide_visually_spec.rb
bourbon-7.2.0 spec/bourbon/library/hide_visually_spec.rb
bourbon-7.1.0 spec/bourbon/library/hide_visually_spec.rb
bourbon-7.0.0 spec/bourbon/library/hide_visually_spec.rb
bourbon-6.0.0 spec/bourbon/library/hide_visually_spec.rb
bourbon-5.1.0 spec/bourbon/library/hide_visually_spec.rb
bourbon-5.0.1 spec/bourbon/library/hide_visually_spec.rb
bourbon-5.0.0 spec/bourbon/library/hide_visually_spec.rb
bourbon-5.0.0.beta.8 spec/bourbon/library/hide_visually_spec.rb