From cca3ba60e8b3242d0c53f47d745c80baf96c45bf Mon Sep 17 00:00:00 2001 From: Jag Talon Date: Thu, 5 Dec 2013 17:19:01 -0500 Subject: [PATCH] RegexCheatSheet: Added a heading and a media query. Should change the layout at around 380px. --- lib/DDG/Goodie/RegexCheatSheet.pm | 2 +- share/goodie/regex_cheat_sheet/style.css | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/DDG/Goodie/RegexCheatSheet.pm b/lib/DDG/Goodie/RegexCheatSheet.pm index 74f2322bf..d7312f1ca 100644 --- a/lib/DDG/Goodie/RegexCheatSheet.pm +++ b/lib/DDG/Goodie/RegexCheatSheet.pm @@ -267,7 +267,7 @@ handle remainder => sub { my $html_output = "
"; $html_output .= join ("
", @html_columns); $html_output .= "
"; - return answer => $text_output, html => append_css($html_output); + return answer => $text_output, html => append_css($html_output), heading => 'Regex Cheat Sheet'; }; 1; diff --git a/share/goodie/regex_cheat_sheet/style.css b/share/goodie/regex_cheat_sheet/style.css index d0564195d..d8010f5ca 100644 --- a/share/goodie/regex_cheat_sheet/style.css +++ b/share/goodie/regex_cheat_sheet/style.css @@ -23,4 +23,10 @@ #zero_click_abstract table.regex-table { width: 100%; margin-bottom: 1ex; +} + +@media (max-width: 380px) { + #zero_click_abstract .regex-column { + width: 100%; + } } \ No newline at end of file