You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2016/05/10 07:10:48 UTC
svn commit: r1743108 - in
/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main:
java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/
resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/
Author: lofwyr
Date: Tue May 10 07:10:47 2016
New Revision: 1743108
URL: http://svn.apache.org/viewvc?rev=1743108&view=rev
Log:
TOBAGO-1560: Separator with label don't look the same in every browser
[developed by hnoeth]
Modified:
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SeparatorRenderer.java
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SeparatorRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SeparatorRenderer.java?rev=1743108&r1=1743107&r2=1743108&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SeparatorRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SeparatorRenderer.java Tue May 10 07:10:47 2016
@@ -24,9 +24,7 @@ import org.apache.myfaces.tobago.compone
import org.apache.myfaces.tobago.component.UISeparator;
import org.apache.myfaces.tobago.renderkit.RendererBase;
import org.apache.myfaces.tobago.renderkit.css.Classes;
-import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
-import org.apache.myfaces.tobago.renderkit.html.HtmlRoleValues;
import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
import org.apache.myfaces.tobago.util.ComponentUtils;
import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
@@ -42,24 +40,18 @@ public class SeparatorRenderer extends R
final UISeparator separator = (UISeparator) component;
final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+ final String clientId = separator.getClientId(facesContext);
final String label = getLabel(separator);
if (label != null) {
- writer.startElement(HtmlElements.FIELDSET);
- writer.writeAttribute(HtmlAttributes.ROLE, HtmlRoleValues.PRESENTATION.toString(), false);
- writer.writeIdAttribute(separator.getClientId(facesContext));
+ writer.startElement(HtmlElements.P);
+ writer.writeIdAttribute(clientId);
writer.writeClassAttribute(Classes.create(separator), separator.getCustomClass());
- HtmlRendererUtils.writeDataAttributes(facesContext, writer, separator);
-
- writer.startElement(HtmlElements.LEGEND);
- writer.writeClassAttribute(Classes.create(separator, "label"));
writer.writeText(label);
- writer.endElement(HtmlElements.LEGEND);
-
- writer.endElement(HtmlElements.FIELDSET);
+ writer.endElement(HtmlElements.P);
} else {
writer.startElement(HtmlElements.HR);
- writer.writeIdAttribute(separator.getClientId(facesContext));
+ writer.writeIdAttribute(clientId);
writer.writeClassAttribute(Classes.create(separator), separator.getCustomClass());
writer.endElement(HtmlElements.HR);
}
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css?rev=1743108&r1=1743107&r2=1743108&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css Tue May 10 07:10:47 2016
@@ -396,24 +396,38 @@ h6 > .fa:first-child {
/* separator -------------------------------------------------------------- */
hr.tobago-separator {
- border-top: 1px solid #e5e5e5;
+ border-top: 1px solid rgba(0, 0, 0, 0.1);
}
-fieldset.tobago-separator {
- border-top: 1px solid #e5e5e5;
- border-bottom: none;
- border-left: none;
- border-right: none;
+p.tobago-separator {
+ text-align: center;
+ border: 0;
+ white-space: nowrap;
display: block;
- margin: 1rem 0rem;
+ overflow: hidden;
+ padding: 0;
+ margin-top: 1em;
+ margin-bottom: 1em;
}
-fieldset.tobago-separator legend {
- width: initial;
- margin-left: 25px;
- padding-left: 10px;
- padding-right: 10px;
- font-size: 12pt;
+p.tobago-separator:before, p.tobago-separator:after {
+ content: "";
+ height: 1px;
+ background-color: rgba(0, 0, 0, 0.1);
+ display: inline-block;
+ vertical-align: middle;
+}
+
+p.tobago-separator:before {
+ width: 80px;
+ margin-left: 0;
+ margin-right: 5px;
+}
+
+p.tobago-separator:after {
+ width: 100%;
+ margin-left: 5px;
+ margin-right: 0;
}
/* sheet -------------------------------------------------------------- */