Testing Hide-Text Mixin Implementation in Bourbon
This test suite validates the hide-text mixin functionality in the Bourbon library, ensuring proper text hiding behavior for CSS styling. The tests verify the correct implementation of overflow, text-indent, and white-space properties for accessible text hiding techniques.
Test Coverage Overview
Implementation Analysis
Technical Details
Best Practices Demonstrated
thoughtbot/bourbon
spec/bourbon/library/hide_text_spec.rb
require "spec_helper"
describe "hide-text" do
before(:all) do
ParserSupport.parse_file("library/hide-text")
end
context "called on element" do
it "adds hide-text" do
ruleset = "overflow: hidden; " +
"text-indent: 101%; " +
"white-space: nowrap;"
expect(".hide-text").to have_ruleset(ruleset)
end
end
end