Giter VIP home page Giter VIP logo

mendix-cssselectorhelperwidget's Introduction

mendix-CssSelectorHelperWidget

Widget IDs of a Mendix application change everytime a page is displayed, so CSS selection using IDs is not possible.

With this widget you can style specific elements (containers) of a page by putting this widget next to the element.

This widget places an attribute on the previous sibling in the DOM tree.

##Typical Usage Scenario Style a specific table or group box or elements within a container

##Features And Limitations Set an attribute on the previous sibling node in the DOM to allow CSS selection styling on it.

##Installation Normal installation using the App Store.

##Dependencies Mendix 5.8.1 Environment

##Configuration In the designer, place this widget directly underneath the element (from here on called the reference element) you want to style and set a value for the attribute.

In the css, styling can be created specific for the attribute value so it gets applied to the referenced element

At runtime, the widget will put attribute cssselectorhelper on the referenced element with the value you specified. This allows the CSS to style the referenced element or any sub elements.

##Examples The result of the examples can be seen in the screenshots.

###Example 1, CssSelectorHelperWidget placed directly underneath a table Value group1 was used as attribute value on the CssSelectorHelperWidget.

Put a background color on the entire table.

table[cssselectorhelper=group1] {
	background-color: #DFFFE7;   
}

Select all labels in a table cell with render mode = header and change the text to appear in blue italic.

table[cssselectorhelper=group1] th>label {
	color: blue;  
	font-style: italic;
}

###Example 2, CssSelectorHelperWidget placed directly underneath a group box Value group2 was used as attribute value on the CssSelectorHelperWidget.

Put a background color on the body of the group box.

div[cssselectorhelper=group2]>div {
	background-color: paleturquoise; 
}

Select all labels in a table cell with render mode = header and change the text to appear in red.

div[cssselectorhelper=group2]>div th>label {
	color: red;   
}

Select all output elements in the groupbox and make them appear as bold green.

div[cssselectorhelper=group2]>div div[id^=mxui_widget_TextInput]>label,
div[cssselectorhelper=group2]>div div[id^=mxui_widget_NumberInput]>label,
div[cssselectorhelper=group2]>div div[id^=mxui_widget_DateInput]>label,
div[cssselectorhelper=group2]>div div[id^=mxui_widget_EnumSelect]>label,
div[cssselectorhelper=group2]>div div.mx-referenceselector-input-wrapper>label{
    color: forestgreen;
    font-weight: bold;
}

For more information about CSS selectors, please check http://www.w3schools.com/cssref/css_selectors.asp

##Properties Attribute value. This value is used for attribute cssselectorhelper.

mendix-cssselectorhelperwidget's People

Contributors

jaspervanderhoek avatar mgroeneweg avatar marcogroenenberg avatar allardbrand avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.