Applying three different background colors to three divs with the same class using LESS - less

HI I am completely new to LESS.I need to do the following task,
Applying three different background colors to three divs with the same class using LESS

Check out CSS's sibling selectors. https://www.w3schools.com/css/css_combinators.asp
Note that this is a general CSS feature, not something specific to LESS

Related

How to adjust the point at which skeleton css shifts it's boxes?

I have a site built using the responsive Skeleton CSS framework (http://getskeleton.com) but when viewing on a phone in portrait mode, three columns across is automatically adjusted so the boxes are vertically stacked rather than all on one line. This has been fine in general but in one particular instance when the boxes have very little content, I need them to stay horizontal - all in one row/on one line. I cannot see anywhere in the css file where this is adjustable though?!
I ended up going old school and creating one twelve column row and putting the column divs inside a td tag each. I then applied some conditional padding at the different breakpoints. Sometimes, very occasionally, you still can't beat a table in my humble opinion!

How do you properly position elements in XAML without using absolute position?

I have a UWP app that I am working on, and using absolute position creates problems when using the app on screen sizes different than the one it was designed for.
I'm not sure how exactly i should place elements at distances from each other without using margin and absolute position. How should I be doing this?
Edit: I am using XAML to design the UI.
Well, it depends on what UI you want to build up.
There are various panels and, usually, there is NO need to use absolute position in most cases.
Usually, the Grid panel is used to create flexible layouts, by adding rows and columns: for example, if you want to create a page with some content and a bottom app bar with buttons on it, you usually create a Grid with as many rows as you need for your content controls, plus one for the bottom appbar itself.
Years ago, I also started building UIs by using absolute position for every element, but then times passes and you start having a flexible mind in order to build flexible layouts.
Sorry to not answer any further, but your question is just TOO broad to give any precise answer.
Best regards
How do you properly position elements in XAML without using absolute position?
You should use an appropriate layout panel:
Layout panels are containers that allow you to arrange and group UI elements in your app. The built-in XAML layout panels include RelativePanel, StackPanel, Grid, VariableSizedWrapGrid, and Canvas.

What class does Qt designer use to edit the properties of UI elements?

At the moment I'm writing a tool to extract parts of frames of mp4-video files. You draw rectangles on the video and the tool extracts .png-images at regular intervals. Now I want to give the user the ability to edit the properties of individual rectangles they have drawn on the video (exact position, frequency of frame extraction, time frame, etc.). I like the approach that QtDesigner takes for editing ui elements. You can see what I mean in this screenshot i found on the internet
The yellow and green table contains name value pairs for the different properties of the selected ui element. The table is devided into section depending on what class the property was inherented from. In the Screenshot the green part is inherented from MarbleWidget. The yellow part is inherented form a different class. I want each division to refer to a different rectangle and the color to match the colour the rectangle is drawn in on the screen.
I've tried using QTreeView, QTableView, QToolBox and QTableWidget but none of these - to my knowledge - offer putting QWidgets in the "value" part of the table. In the screenshot you can see tick boxes for example. In my case I would want to use a range slider. Does anyone know what class is used to Implement this table?
I think you'll find it difficult to use the designer classes in a normal application.
See qtpropertybrowser for a properties editor.
See setIndexWidget for a static widget. As it says, use QItemDelegate for dynamic widgets. Note that the specific item subclasses have their own methods like QTableWidget.setCellWidget.

Displaying Multiple Images using labelProvider

We have been working in a Tree Editor. We are displaying icons below the file names. Now, we have a need to display another icons below this already displayed icon. This icon will be displayed based on some parameters. Hence, it is not necessary that always multiple icons will be displayed.
We have our own LabelProvider which correctly returns a single image.
Please, let me know how can I customise my LabelProvider to return multiple images ?
The normal LabelProvider only supports returning a single image per row.
There are some classes available which let you make a composite image from several separate images. The abstract base class for these is CompositeImageDescriptor. The DecorationOverlayIcon class is a concrete class based in this which supports a main image with up to four overlay images (this is what views like Package Explorer use).
If those classes are not enough you can use a label provider based on OwnerDrawLabelProvider - which allows you to draw what you like in the row.
Note: All rows in a tree (or table) are always the same height. A deep image in one row will force all the other rows to be the same depth.

Remove margin on a label on 2 lines?

I just have a little graphic issue, i have a label which contain a text on 2 lines but there is an horrible margin, like 10px ...
Is there an solution for removing or reducing this marging ?
have i to use web view for use css ? :/
Thanks,
I'm afraid there isn't an easy solution.
You could try some of the tips presented here: http://www.iphonedevsdk.com/forum/iphone-sdk-development/14178-spacing-between-lines-multiline-uilabel.html#
or break your label into two different labels or use an uiwebview.
Anyway, excepting the case where you have a localized label, with dynamic text based on an xml, just use two different labels for each line and place them as you please