[Bf-docboard-svn] bf-manual: [8353] trunk/blender_docs/resources: CSS: Use flex to position the version/language drop down

Aaron Carlisle noreply at blender.org
Mon Aug 30 23:35:59 CEST 2021


Revision: 8353
          https://developer.blender.org/rBM8353
Author:   Blendify
Date:     2021-08-30 23:35:58 +0200 (Mon, 30 Aug 2021)
Log Message:
-----------
CSS: Use flex to position the version/language drop down

The only visible change here is on mobile the drop downs are centered instead of lift/right aligned.
This is done so that the menus are consistent in the case adding/removing menu items, for example if there are no translations.

Modified Paths:
--------------
    trunk/blender_docs/resources/templates/versions.html
    trunk/blender_docs/resources/theme/css/version_switch.css

Modified: trunk/blender_docs/resources/templates/versions.html
===================================================================
--- trunk/blender_docs/resources/templates/versions.html	2021-08-30 17:15:33 UTC (rev 8352)
+++ trunk/blender_docs/resources/templates/versions.html	2021-08-30 21:35:58 UTC (rev 8353)
@@ -1,6 +1,6 @@
 <div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="document versions">
 <ul id="versionwrap" role="presentation">
-   <li style="float:left" role="presentation">
+   <li role="presentation">
 		<span id="version-popover" class="version-btn" tabindex="0" role="button" aria-label="versions selector" aria-haspopup="true" aria-controls="version-vsnlist" aria-disabled="true">
 		{{ release }} 
 		</span>
@@ -12,7 +12,7 @@
 			</ul>
 		</div>
 	</li>
-   <li style="float:right" role="presentation">
+   <li role="presentation">
 		<span id="lang-popover" class="version-btn" tabindex="0" role="button"  aria-label="language selector" aria-haspopup="true" aria-controls="version-langlist">
 			{% if language is not none %} {{ language }} {% else %} en {% endif %}
 		</span>

Modified: trunk/blender_docs/resources/theme/css/version_switch.css
===================================================================
--- trunk/blender_docs/resources/theme/css/version_switch.css	2021-08-30 17:15:33 UTC (rev 8352)
+++ trunk/blender_docs/resources/theme/css/version_switch.css	2021-08-30 21:35:58 UTC (rev 8353)
@@ -12,18 +12,19 @@
 	content: "";
 }
 #versionwrap {
-	display: block;
-	padding: 2px 0px 30px;
+	display: flex;
+	padding-top: 2px;
 	font-size: 90%;
+	justify-content: center;
+	flex-wrap: wrap;
 }
 .version-btn {
-	position: relative;
 	display: inline-block;
 	background-color: #272525;
 	width: 140px;
 	text-align: center;
 	padding: 3px 10px;
-	margin: 0 5px;
+	margin: 0px 5px 4px;
 	vertical-align: middle;
 	color: #27AE60;
 	border: solid 1px #444444;



More information about the Bf-docboard-svn mailing list