Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Item13268: improved and simplified clear of floats
  • Loading branch information
MichaelDaum committed Feb 20, 2015
1 parent 9f80c4e commit 66983b6
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 37 deletions.
15 changes: 6 additions & 9 deletions PatternSkin/data/System/PatternSkinElements.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1421599902" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1424432594" format="1.1" version="1"}%
%META:TOPICPARENT{name="PatternSkin"}%
---+!! Pattern Skin Elements
Some intro text.
Expand Down Expand Up @@ -559,33 +559,30 @@ Text before <span class='foswikiMessage'>This is important</span> text after.
---++ Horizontal list
=.foswikiHorizontalList=

<div class='foswikiHorizontalList'>
<div class='foswikiHorizontalList clear'>
1 ordered item 1
1 ordered item 2
1 ordered item 3
<div class='foswikiClear'></div>
</div>

<div class='foswikiHorizontalList'>
<div class='foswikiHorizontalList clear'>
* unordered item 1
* unordered item 2
* unordered item 3
<div class='foswikiClear'></div>
</div>

<div class='foswikiHorizontalList'>
<div class='foswikiHorizontalList clear'>
<ul>
<li>unordered item 1</li>
<li>unordered item 2</li>
<li class='foswikiLast'>unordered item 3</li>
</ul>
<div class='foswikiClear'></div>
</div>

---++ Tabs

---+++ Foswiki tabs
<div class='foswikiTabs foswikiClearfix'>
<div class='foswikiTabs clear'>
<ul>
<li class='foswikiActive'><a href='#tab1'>Tab 1</a></li>
<li><a href='#tab2'>Tab 2</a></li>
Expand All @@ -606,7 +603,7 @@ Regular text lorem ipsum dolor sit amet, <a href='#' title='test link'>test link
</div>

---+++ Foswiki tabs without tab pane
<div class='foswikiTabs foswikiClearfix'>
<div class='foswikiTabs clear'>
<ul>
<li class='foswikiActive'><a href='#tab1'>Tab 1</a></li>
<li><a href='#tab2'>Tab 2</a></li>
Expand Down
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1424431365" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1424432594" format="1.1" version="1"}%
%META:TOPICPARENT{name="PatternSkin"}%
---+!! <nop>PatternSkin horizontal navigation example

Expand All @@ -9,7 +9,7 @@ Include main navigation with:

---++ Include sections
<verbatim class="tml">
%STARTSECTION{"main"}%<div id="patternTopBarButtons"><ul>
%STARTSECTION{"main"}%<div id="patternTopBarButtons"><ul class="clear">
%INCLUDE{
"PatternSkinNavigation"
section="topbarbutton"
Expand All @@ -34,6 +34,6 @@ Include main navigation with:
DESTTOPIC="%HOMETOPIC%"
LABEL="%SANDBOXWEB%"
}%
</ul><br class="foswikiClear" /></div>%ENDSECTION{"main"}%
</ul></div>%ENDSECTION{"main"}%

<!-- %JQREQUIRE{"chili"}% -->
4 changes: 2 additions & 2 deletions PatternSkin/data/System/PatternSkinNavigation.txt
Expand Up @@ -10,7 +10,7 @@ Include main navigation with:
---++ Include sections
<verbatim class="tml">
%STARTSECTION{"main"}%<noautolink>
<div id="patternTopBarButtons"><ul class="sf-menu">
<div id="patternTopBarButtons"><ul class="sf-menu clear">
%INCLUDE{"%TOPIC%" section="topbarbutton" DESTWEB="%USERSWEB%" DESTTOPIC="%HOMETOPIC%" LABEL="%JQICON{"fa-home" style="font-size:1.1em"}% %USERSWEB%"}%
<li>[[%WIKIUSERNAME%][%JQICON{"fa-user"}% %MAKETEXT{"My Profile"}%]]</li>
%IF{"istopic '%USERSWEB%.%WIKINAME%LeftBar'"
Expand All @@ -23,7 +23,7 @@ Include main navigation with:
$percntINCLUDE{\"%TOPIC%\" section=\"webtools\"}$percnt
</li>"
}%<li><a>%JQICON{"fa-cloud"}% Webs</a>%INCLUDE{"%TOPIC%" section="webs"}%</li>
</ul>%CLEAR%</div>
</ul></div>
%JQREQUIRE{"superfish"}%%ADDTOZONE{
"script"
id="PATTERNMENU"
Expand Down
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1424431365" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1424432594" format="1.1" version="1"}%
%META:TOPICPARENT{name="PatternSkinFatwillyTheme"}%
---+!! <nop>PatternSkin theme: Foswiki "Fat Willy" Site Skin - Navigation

Expand All @@ -15,7 +15,7 @@ Include meta navigation with:

---++ Include sections
<verbatim class="tml">
%STARTSECTION{"main"}%<div id="patternTopBarButtons"><ul>
%STARTSECTION{"main"}%<div id="patternTopBarButtons"><ul class="clear">
%INCLUDE{
"PatternSkinNavigation" section="topbarbutton"
ID="" DESTWEB="About" DESTTOPIC="%HOMETOPIC%" LABEL="About"
Expand Down Expand Up @@ -52,7 +52,7 @@ Include meta navigation with:
"PatternSkinNavigation" section="topbarbutton"
ID="" DESTWEB="Support" DESTTOPIC="%HOMETOPIC%" LABEL="Support"
}%
</ul><div class="foswikiClear"></div></div>%ENDSECTION{"main"}%
</ul></div>%ENDSECTION{"main"}%


%STARTSECTION{"meta"}%<div id="foswikisiteUserBar"><ul>%IF{
Expand Down
27 changes: 19 additions & 8 deletions PatternSkin/pub/System/PatternSkinTheme/layout_src.css
Expand Up @@ -20,14 +20,25 @@ as this will break the design ***/
body {

}
.clear {
clear:both;
/*** these next attributes are designed to keep the div
height to 0 pixels high, critical for Safari and Netscape 7 ***/
height:0px;
overflow:hidden;
line-height:1%;
font-size:0px;
/* http://perishablepress.com/press/2008/02/05/lessons-learned-concerning-the-clearfix-css-hack */
.clear:after,
.clearfix:after {
clear: both;
content: ' ';
display: block;
font-size: 0;
line-height: 0;
visibility: hidden;
width: 0;
height: 0;
}
.clear,
.clearfix {
*zoom:1; /* IE7 hack */
}
* html .clear,
* html .clearfix {
height: 1%;
}
#patternPage {
position:relative;
Expand Down
7 changes: 3 additions & 4 deletions PatternSkin/templates/edit.pattern.tmpl
Expand Up @@ -37,13 +37,13 @@
%TMPL:DEF{"button_cancel"}%<input type="submit" class="foswikiButtonCancel" name="action_cancel" id="cancel" title='%MAKETEXT{"Cancel editing and discard changes"}%' %MAKETEXT{"value='Cancel' accesskey='c'"}% />%TMPL:END%


%TMPL:DEF{"topicinfo"}%%TMPL:P{context="RevCommentPluginEnabled" then="revCommentPluginOptions"}%<hr /><div class="patternTopicActions foswikiFormStep"><div class="patternActionButtons">%TMPL:P{"action_buttons"}%<div class="foswikiClear"></div></div></div>%TMPL:P{"forcerevisioncheckbox"}%%TMPL:END%
%TMPL:DEF{"topicinfo"}%%TMPL:P{context="RevCommentPluginEnabled" then="revCommentPluginOptions"}%<hr /><div class="patternTopicActions foswikiFormStep clear"><div class="patternActionButtons">%TMPL:P{"action_buttons"}%</div></div>%TMPL:P{"forcerevisioncheckbox"}%%TMPL:END%


%TMPL:DEF{"textarea"}%%IF{"{Validation}{Method}='strikeone'" then="<noscript>$percentTMPL:P{enable_js}$percent</noscript>"}%<div class="patternEditTopic"><textarea class="foswikiTextarea foswikiEditboxStyleProportional foswikiWysiwygEdit" id="topic" name="text" rows="%EDITBOXHEIGHT%" cols="%EDITBOXWIDTH%" style='%EDITBOXSTYLE%'>%TEXT%</textarea>%TMPL:P{"sig_textareabuttons"}%</div>%TMPL:END%


%TMPL:DEF{"sig_textareabuttons"}%<div class="patternSigLine">%IF{"not context TinyMCEPluginEnabled or $nowysiwyg='1' or $NOWYSIWYG='1'" then='%TMPL:P{"textareabuttons"}%'}%%TMPL:P{"sig"}%<div class="foswikiClear"></div></div>%TMPL:END%
%TMPL:DEF{"sig_textareabuttons"}%<div class="patternSigLine clear">%IF{"not context TinyMCEPluginEnabled or $nowysiwyg='1' or $NOWYSIWYG='1'" then='%TMPL:P{"textareabuttons"}%'}%%TMPL:P{"sig"}%</div>%TMPL:END%

%TMPL:DEF{"sig"}%<span class="patternSig"><input class="foswikiInputFieldReadOnly" size="41" name="sig" type="text" readonly="readonly" title='%MAKETEXT{"Select, copy and paste your signature text to the bottom of your entry"}%' id="sig" value="%TMPL:P{"sig_format"}%" /> <label for="sig" class="foswikiGrayText">%MAKETEXT{"Your signature to copy/paste"}%&nbsp;&nbsp;</label></span>%TMPL:END%

Expand Down Expand Up @@ -74,9 +74,8 @@ noscript="hide"
%TMPL:P{"toolbar"}%
%TMPL:P{"textarea"}%
<div class="foswikiFormSteps">
<div class="foswikiFormStep">
<div class="foswikiFormStep clear">
%TMPL:P{"formbottom"}%
<div class="foswikiClear"></div>
</div>%TMPL:P{"topicinfo"}%
</div>
%TMPL:P{"formend"}%%TMPL:END%
5 changes: 2 additions & 3 deletions PatternSkin/templates/editform.pattern.tmpl
Expand Up @@ -2,11 +2,10 @@

%TMPL:DEF{"content"}%%TMPL:P{"formstart"}%
<div class="foswikiFormSteps">
<div class="foswikiFormStep">
<div class="foswikiFormStep clear">
%TMPL:P{"formbottom"}%
<div class="foswikiClear"></div>
</div>
%TMPL:P{"topicinfo"}%
</div>
<input type="hidden" id="topic" name="text" value="%TEXT%" />
%TMPL:P{"formend"}%%TMPL:END%
%TMPL:P{"formend"}%%TMPL:END%
6 changes: 3 additions & 3 deletions PatternSkin/templates/search.pattern01x00.tmpl
Expand Up @@ -4,14 +4,14 @@
Legacy definitions to support Foswiki 1.0.x with newer PatternSkin
}%

%TMPL:DEF{"Foswiki01x00:result"}%<div class="patternSearchResult"><div class="foswikiTopRow"><div class="foswikiLeft"><a href="%SCRIPTURLPATH{"view"}%/%WEB%/%TOPICNAME%"><b>%TOPICNAME%</b></a></div><div class="foswikiRight foswikiSRAuthor"> %AUTHOR%</div><div class="foswikiRight foswikiSRRev">%REVISION% - <a href="%SCRIPTURLPATH{"rdiff"}%/%WEB%/%TOPICNAME%" rel='nofollow'>%TIME%</a>&nbsp;</div><div class="foswikiClear"></div></div><!--/foswikiTopRow--><div class="foswikiBottomRow"><div class="foswikiSummary foswikiGrayText">%TEXTHEAD%</div><!--/foswikiSummary-->
%TMPL:DEF{"Foswiki01x00:result"}%<div class="patternSearchResult"><div class="foswikiTopRow clear"><div class="foswikiLeft"><a href="%SCRIPTURLPATH{"view"}%/%WEB%/%TOPICNAME%"><b>%TOPICNAME%</b></a></div><div class="foswikiRight foswikiSRAuthor"> %AUTHOR%</div><div class="foswikiRight foswikiSRRev">%REVISION% - <a href="%SCRIPTURLPATH{"rdiff"}%/%WEB%/%TOPICNAME%" rel='nofollow'>%TIME%</a>&nbsp;</div></div><!--/foswikiTopRow--><div class="foswikiBottomRow"><div class="foswikiSummary foswikiGrayText">%TEXTHEAD%</div><!--/foswikiSummary-->
</div><!--/foswikiBottomRow--></div><!--/patternSearchResult-->%TMPL:END%

%TMPL:DEF{"Foswiki01x00:searched"}%<span class="patternSearched">%MAKETEXT{"Searched:"}% <b><noautolink>%SEARCHSTRING%</noautolink></b></span><span id="foswikiNumberOfResultsContainer"></span><span id="foswikiModifySearchContainer"></span>%TMPL:END%

%TMPL:DEF{"Foswiki01x00:count"}%<div class="patternSearchResultCount">%MAKETEXT{"Number of topics:"}% <span class="foswikiSearchResultCount">%NTOPICS%</span></div><!--/patternSearchResultCount-->%TMPL:END%

%TMPL:DEF{"Foswiki01x00:header"}%<h4 class="patternSearchResultsHeader" %TMPL:P{"Foswiki01x00:header:style:backgroundcolor"}%><span class="foswikiLeft">%TMPL:P{"Foswiki01x00:header:left"}%</span><span class="foswikiRight">%TMPL:P{"Foswiki01x00:header:right"}%</span><br class="foswikiClear" /></h4>%TMPL:END%
%TMPL:DEF{"Foswiki01x00:header"}%<h4 class="patternSearchResultsHeader clear" %TMPL:P{"Foswiki01x00:header:style:backgroundcolor"}%><span class="foswikiLeft">%TMPL:P{"Foswiki01x00:header:left"}%</span><span class="foswikiRight">%TMPL:P{"Foswiki01x00:header:right"}%</span></h4>%TMPL:END%

%TMPL:DEF{"Foswiki01x00:header:left"}%<b>%MAKETEXT{"Results from [_1] web" args="<nop>%WEB%"}%</b> %MAKETEXT{"retrieved at [_1]" args="%DISPLAYTIME{"$hour:$min ($tz)"}%"}%%TMPL:END%

Expand All @@ -20,4 +20,4 @@
%TMPL:DEF{"Foswiki01x00:header:style:backgroundcolor"}%style="background-color:%WEBBGCOLOR%"%TMPL:END%

%TMPL:DEF{"content"}%%SPLIT%%TMPL:P{"Foswiki01x00:searched"}%
%SPLIT%%TMPL:P{"Foswiki01x00:header"}%%REPEAT%%TMPL:P{"Foswiki01x00:result"}%%REPEAT%%SPLIT%%TMPL:P{"Foswiki01x00:count"}%%SPLIT%%TMPL:END%
%SPLIT%%TMPL:P{"Foswiki01x00:header"}%%REPEAT%%TMPL:P{"Foswiki01x00:result"}%%REPEAT%%SPLIT%%TMPL:P{"Foswiki01x00:count"}%%SPLIT%%TMPL:END%
4 changes: 2 additions & 2 deletions PatternSkin/templates/view.pattern.tmpl
Expand Up @@ -21,7 +21,7 @@
%TMPL:DEF{"attachmentstop"}%%TMPL:P{"attachmentsattop"}%%TMPL:END%
%TMPL:DEF{"attachmentsbottom"}%%TMPL:P{"attachmentsatbottom"}%%TMPL:END%%{
---------------------------------------------------
}%%TMPL:DEF{"top"}%<div class="patternTop"><span class="patternHomePath foswikiLeft">%TMPL:P{"breadcrumb"}%</span><span class="patternToolBar foswikiRight">%TMPL:P{"top:toolbarbuttons"}%</span><div class="foswikiClear"></div></div>%TMPL:END%
}%%TMPL:DEF{"top"}%<div class="patternTop clear"><span class="patternHomePath foswikiLeft">%TMPL:P{"breadcrumb"}%</span><span class="patternToolBar foswikiRight">%TMPL:P{"top:toolbarbuttons"}%</span></div>%TMPL:END%

%TMPL:DEF{"top:toolbarbuttons"}%%TMPL:P{"activatable_edit_or_create"}%%TMPL:P{"activatable_attach"}%%TMPL:P{context="SubscribePluginEnabled" then="activatable_subscribe"}%%TMPL:END%%{
---------------------------------------------------
Expand Down Expand Up @@ -74,6 +74,6 @@
</span>"
}%%TMPL:END%%{
---------------------------------------------------
}%%TMPL:DEF{"sig_textareabuttons"}%<div class="patternSigLine">%TMPL:P{"textareabuttons"}%<div class="foswikiClear"></div></div>%TMPL:END%%{
}%%TMPL:DEF{"sig_textareabuttons"}%<div class="patternSigLine clear">%TMPL:P{"textareabuttons"}%</div>%TMPL:END%%{
---------------------------------------------------
}%%TMPL:DEF{"horizontalnavigation"}%%IF{"istopic '%PATTERNSKIN_NAVIGATION_TOPIC%'" then="$percntINCLUDE{$quot%PATTERNSKIN_NAVIGATION_TOPIC%$quot section=$quotmain$quot warn=$quotoff$quot}$percnt"}%%TMPL:END%

0 comments on commit 66983b6

Please sign in to comment.