Bootstrap Columns Different in Titanium?

Discuss all problems you have with Servoy here. It might help to mention the Servoy version and Operating System version you are using

Bootstrap Columns Different in Titanium?

Postby john1598360627 » Thu Jun 30, 2022 12:02 am

Code: Select all
Servoy Version: 2022.3.1.3743



I have a problem with how Bootstrap Columns seem to work now within Titanium.


In NG, I created a search bar. In this search bar, I had labels placed above a textbox. These would then scale with the column they are in, so the bigger or smaller the column got the labels would track with the textbox.

NG EDITOR
search_edit_ng.png
search_edit_ng.png (33.52 KiB) Viewed 2642 times


NG
search_ng.png
search_ng.png (2.44 KiB) Viewed 2642 times


CSS
Code: Select all
.search-clear-label{
   
   padding: 5px 5px;
   
   position: absolute;
     
   top: 5px;
   
   text-align: right;
   right: 1.5em;
   
   &:hover{
   
      border-radius: 10px;
      background-color: @primary-color-light;
      
   
   }
   
   &:active{
      border-radius: 10px;
      background-color: @primary-color-dark;
   
   }
   
}


.search-icon-label{
   
   padding: 4px 4px;
   position: absolute;
     
   top: 5px;
   
   text-align: left;
   left: 1.5em;
   
   
   &:hover{
   
      border-radius: 10px;
      background-color: @primary-color-light;
      
   
   }
   
   &:active{
      border-radius: 10px;
      background-color: @primary-color-dark;
   
   }
   
}




However, in Titanium, the labels are now not attached to the column they are in, instead it's based upon the entire screen. This breaks the design I had, because before the labels would autosize with the textbox, but now it autosizes with the entire screen which defeats the purpose I was going for.

TITANIUM
search_titan.png
search_titan.png (5.34 KiB) Viewed 2642 times


Is this how positioning is supposed to work in Titanium? To me, it seems more useful to be able to position elements based upon the column they are in, to basically create a self-contained component, but perhaps I'm missing something.
john1598360627
 
Posts: 183
Joined: Tue Aug 25, 2020 3:03 pm

Re: Bootstrap Columns Different in Titanium?

Postby john1598360627 » Wed Aug 24, 2022 11:53 pm

I was able to fix the labels for the Search and Clear by using float and transform.



Code: Select all
.label-clear-hover{

   text-align: right;
   
   float: right;

   display: grid;
    justify-content: right;

   
    position: relative;
   
    transform: translate(-10px, -30px);
   

   
}
john1598360627
 
Posts: 183
Joined: Tue Aug 25, 2020 3:03 pm


Return to Discuss possible Issues and Bugs

Who is online

Users browsing this forum: Google [Bot] and 2 guests