Skip to main content

Advanced CSS

Advanced CSS is a powerful way to add more advanced and nuanced customization to Askribe consumer using SCSS code. We expose classes that are used in consumer to enable styling customization using Advanced CSS. The classes exposed are as follows. These are the classes exposed in Reel View.

SCSS Version used: libsass 3.6.5 Syntax Documentation

Block Selection Classes

These classes are added to the root element of each block. These classes are also applied to the root element of each Form Item in a Form block. These classes are added to the blocks based on block type. Unless specified, these classes are applicable for blocks and blocks appearing as Form Items.

note

The header, footer and action buttons are not included in the element selected block. If you want to include these element, use .askribe-fg or .askribe-consumer

The class names and the block types that they are applicable are as follows

Class NameApplicable blocks
askribe-blockAll blocks except form
askribe-statementStatement block
askribe-questionAll interrogative blocks: Captcha, Signature, Ask Contact, Ask Location, Rating, MCQ, Ranking, Date / Time, Text Answer, Capture Media, Upload, Matrix and UX
askribe-welcomeWelcome block
askribe-mcqMCQ block
askribe-rankingRanking block
askribe-text-answerText Answer block
askribe-capture-mediaCapture Media block
askribe-date-timeDate Time block
askribe-ratingRating block
askribe-matrixMatrix block
askribe-uxUX block
askribe-signatureSignature block
askribe-uploadUpload block
askribe-thanksThanks block
askribe-captchaCaptcha block
askribe-ask-locationAsk Location block
askribe-ask-contactAsk Contact block
askribe-send-locationSend Location block
askribe-send-contactSend Contact block
askribe-send-stickerSend Sticker block
askribe-whatsapp-templateWhatsApp Template Message block

Example 1

Code

.askribe-block {
background-color: palegreen;
}

Result

Example 2

Code

.askribe-statement {
background-color: palegreen;
}

Result

This applies a pale green background to Statement Blocks

The other blocks, such as the Send Sticker Block below, remain unaffected.

Form Block Classes

The following classes are applicable for a Form block

Class NameApplied To
askribe-form-containerThe root element of a Form block
askribe-form-itemroot element of each Form Item
askribe-form-title-containerThe element containing Form block title
aaskribe-form-titleForm block title
askribe-form-buttonThe submit button if the displayed block type is Form
note

.askribe-form-title-container includes previous and next block links along with the Form block title. .askribe-form-title only includes the Form block title.

Example 1

Code

.askribe-form-container  {
background-color: palegreen;
}

Result

Example 2

Code

.askribe-form-item  {
background-color: palegreen;
}

Result

Welcome Block Classes

The following classes are applicable for a Welcome block

Class NameApplied To
askribe-welcome-btnWelcome block submit button

Thanks Block Classes

The following classes are applicable for a Thanks block

Class NameApplied To
askribe-thanks-btnThanks block submit button

Text Answer Block Classes

The following classes are applicable for a Text Answer block

Class NameApplied To
askribe-text-answer-responseText Answer block text field
askribe-text-answer-single-line-responseText Answer block text field, if format type is None and text line type is Single Line
askribe-text-answer-multi-line-responseText Answer block text field, if format type is None and text line type is Multi Line
askribe-text-answer-phone-responseText Answer block text field, if format type is Phone Number
askribe-text-answer-email-responseText Answer block text field, if format type is Email
askribe-text-answer-url-responseText Answer block text field, if format type is URL
askribe-text-answer-numeric-responseText Answer block text field, if format type is Number

Example 1

Code

.askribe-text-answer-response  {
background-color: palegreen;
}

Result

MCQ Block Classes

The following classes are applicable for a MCQ block

Class NameApplied To
askribe-mcq-optionMCQ block option
askribe-mcq-list-options-containerMCQ block element containing options / groups
askribe-mcq-list-optionMCQ block option, if display format is list
askribe-mcq-dropdownMCQ block options dropdown, if display format is dropdown
askribe-mcq-dropdown-menuMCQ block options popup menu, if display format is dropdown
askribe-mcq-dropdown-optionMCQ block option, if display format is dropdown
askribe-mcq-groupMCQ block group, if option groups are enabled
askribe-mcq-list-groupMCQ block group, if option groups are enabled and display format is list
askribe-mcq-dropdown-groupMCQ block group, if option groups are enabled and display format is dropdown
askribe-mcq-text-entryMCQ block text entry field

Example 1

Code

.askribe-mcq-option:first-child {
background-color: palegreen;
}

Result

Example 2

Code

.askribe-mcq-group:first-child {
background-color: palegreen;
}

Result

Ranking Block Classes

The following classes are applicable for a Ranking block

Class NameApplied To
askribe-ranking-options-containerRanking block element containing options
askribe-ranking-optionRanking block option
askribe-ranking-option-dragRanking block drag indicator icon

Example 1

Code

.askribe-ranking-option:first-child {
background-color: palegreen;
}

Result

Example 2

Code

.askribe-ranking-options-container {
background-color: palegreen;
}

Result

Capture Media Block Classes

The following classes are applicable for a Capture Media block

Class NameApplied To
askribe-media-responseCapture Media block media capture widget, for all media types
askribe-audio-responseCapture Media block media capture widget, for media type audio
askribe-video-responseCapture Media block media capture widget, for media type video
askribe-image-responseCapture Media block media capture widget, for media type image
askribe-capture-media-btnCapture Media block media capture widget buttons, for all media types
askribe-multiple-media-containerThe element containing Capture Media block media capture widgets, when Allow Multiple Media is selected
askribe-add-media-buttonCapture Media block add media button. This is applicable only when Allow Multiple Media is selected. This is the button which adds more media capture widgets.

Example 1

Code

.askribe-media-response {
background-color: palegreen;
}

Result

Example 2

Code

.askribe-add-media-button {
background-color: palegreen;
color: black;
}

Result

Date / Time Block Classes

The following classes are applicable for a Date / Time block

Class NameApplied To
askribe-date-responseDate / Time block response field, if type is Date
askribe-time-responseDate / Time block response field, if type is Time
askribe-date-time-responseDate / Time block response field, if type is Date-Time
askribe-date-response-containerDate / Time block element containing response field and clear button, if type is Date
askribe-time-response-containerDate / Time block element containing response field and clear button, if type is Time
askribe-date-time-response-containerDate / Time block element containing response field and clear button, if type is Date-Time

Example 1

Code

.askribe-date-response {
background-color: palegreen;
}

Result

Example 2

Code

.askribe-date-response-container {
background-color: palegreen;
}

Result

Matrix Block Classes

For this block, depending on the width of the consumer, the Matrix block options are displayed to the user in one of two ways.

Desktop View:

  • This view is displayed to the user if the width of consumer is greater than or equal to 768px
  • In this view, the matrix question is displayed as a table like structure
    • The first row contains the column option labels
    • The rest or the rows contain row option labels in first column and checkbox / radio input on the subsequent columns for user to answer

Mobile View:

  • This view is displayed to the user if the width of consumer is less than to 768px
  • In this view, the matrix question is displayed as an accordion like structure
    • The row option label is displayed on each of the accordion segments
    • Once an accordion segment is opened, all the column option labels are displayed with a checkbox / radio input for user to answer

The following classes are applicable for a Matrix block. Some of the below classes are only applicable for Desktop UI or Mobile UI. If nothing is mentioned, the class is applicable for both views.

Class NameApplied To
askribe-matrix-response-containerThe element containing Matrix block options, in Desktop view
askribe-matrix-headerMatrix block options table first row, in Desktop view
askribe-matrix-rowMatrix block options table subsequent rows, in Desktop view
askribe-matrix-mobile-response-containerThe element containing Matrix block options, in Mobile view
askribe-matrix-mobile-collapsible-rowMatrix block accordion segment, in Mobile view
askribe-matrix-mobile-dividerThe divider element between row options, in Mobile view
askribe-matrix-mobile-selected-answerThe element containing Matrix block checked column and its corresponding checkbox / radio input
askribe-matrix-row-labelMatrix block row option label
askribe-matrix-col-labelMatrix block column option label
askribe-matrix-inputMatrix block checkbox / radio input
askribe-matrix-checkboxMatrix block checkbox input. Applicable for single multi Matrix
askribe-matrix-radioMatrix block radio input. Applicable for single select Matrix

Rating Block Classes

The following classes are applicable for a Rating block

Class NameApplied To
askribe-rating-response-containerThe element containing Rating block response
askribe-rating-options-containerThe element containing Rating block options
askribe-rating-sliderRating block slider
askribe-rating-left-labelRating block left label
askribe-rating-right-labelRating block right label
askribe-rating-optionRating block option
askribe-rating-option-filledRating block filled option. Applicable for options below the selected option are displayed as filled icons
askribe-rating-option-selectedRating block selected option
askribe-rating-option-numberRating block option, if rating type is Number
askribe-rating-option-thumbsupRating block option, if rating type is Thumbs Up
askribe-rating-option-reactionRating block option, if rating type is Reaction
askribe-rating-option-lightningRating block option, if rating type is Lightning
askribe-rating-option-starsRating block option, if rating type is Stars

Example 1

Code

.askribe-rating-response-container {
background-color: palegreen;
}

Result

Example 2

Code

.askribe-rating-options-container {
background-color: palegreen;
}

Result

Example 3

Code

.askribe-rating-option-thumbsup {
background-color: palegreen;
}

Result

Signature Block Classes

The following classes are applicable for a Signature block

Class NameApplied To
askribe-signature-response-containerThe element containing Signature block response
askribe-signature-response-format-containerThe element containing the Signature block response type selection tabs
askribe-signature-response-format-tabSignature block response type selection tab
askribe-signature-response-format-tab-selectedSelected Signature block response type selection tab
askribe-signature-drawThe element containing Signature block drawn response
askribe-signature-typeThe element containing Signature block typed response
askribe-signature-uploadThe element containing Signature block uploaded response
askribe-signature-clear-btnSignature block clear response button

Example 1

Code

.askribe-signature-response-container {
background-color: palegreen;
}

Result

Example 2

Code

.askribe-signature-response-format-container {
background-color: palegreen;
}

Result

Upload Block Classes

The following classes are applicable for an Upload block

Class NameApplied To
askribe-upload-response-containerThe element containing Upload block response
askribe-upload-uploaded-fileThe element containing uploaded file details
askribe-upload-file-inputThe input element used to upload file

Code

.askribe-upload-response-container {
background-color: palegreen;
}

Result

Send Sticker Block Classes

The following classes are applicable for a Send Sticker block

Class NameApplied To
askribe-sticker-mediaThe element containing sticker media

Example 1

Code

.askribe-sticker-media {
background-color: palegreen;
}

Result

Send Contact Block Classes

The following classes are applicable for a Send Contact block

Class NameApplied To
askribe-send-contact-contacts-containerThe element containing list of contacts
askribe-send-contact-contactThe element containing a single contact

Code

.askribe-send-contact-contact {
background-color: palegreen;
}

Result

Example 2

Code

.askribe-send-contact-contacts-container {
background-color: palegreen;
}

Result

Send Location Block Classes

The following classes are applicable for a Send Location block

Class NameApplied To
askribe-send-location-addressSend Location block address
askribe-send-location-static-mapSend Location block static map image

Code

.askribe-send-location-address {
background-color: palegreen;
}

Result

Example 2

Code

.askribe-send-location-static-map {
background-color: palegreen;
padding: 5px;
}

Result

Captcha Block Classes

The following classes are applicable for a Captcha block

Class NameApplied To
askribe-captcha-answerCaptcha block response

Ask Location Block Classes

The following classes are applicable for an Ask Location block

Class NameApplied To
askribe-ask-location-response-containerThe element containing all Ask Location block response fields
askribe-ask-location-full-address-fieldAsk Location block full address field
askribe-ask-location-address-response-sectionThe element containing Ask Location block address fields (street, city, state, zip, country, type)
askribe-ask-location-address-response-itemAsk Location block address field (street, city, state, zip, country, or type)
askribe-ask-location-map-sectionThe element containing Ask Location map fields (interactive map and search location field)
askribe-ask-location-map-searchAsk Location block search location field
askribe-ask-location-mapThe element containing Ask Location block interactive map

UX Block Classes

The following classes are applicable for a UX block

Class NameApplied To
askribe-ux-screenshotThe element containing whole response when feedback type is Screenshot
askribe-ux-screenshot-btnUX block take screenshot button
askribe-ux-screenshot-result-containerThe element containing UX block screenshot editor
askribe-ux-screenshot-delete-btnUX block delete screenshot button
askribe-ux-feedback-contextThe element containing whole response when feedback type is Feedback with context
askribe-ux-feedback-result-containerThe element containing feedback with context image
askribe-ux-feedback-context-btnUX block capture feedback with context button
askribe-ux-delete-delete-btnUX block delete feedback with context image button
askribe-ux-screen-recordThe element containing whole response when feedback type is Record Screen
askribe-ux-screen-record-result-containerThe element containing screen recording video
askribe-ux-screen-record-btnUX block record screen button
askribe-ux-screen-record-resultUX block screen recording video
askribe-ux-screen-record-previewUX block preview video while screen is being recorded
askribe-ux-screen-record-delete-btnUX block delete screen recording button
askribe-ux-text-responseUX block feedback text field (for all three types)

General Miscellaneous Classes

Class NameApplied To
askribe-bgThe element on which the background is applied
askribe-fgThe element on which the consumer contents are rendered. It overlaps with .askribe-bg if background layout is Full Background. This has a higher z-index than askribe-bg
askribe-bg-videoThe element on which video background is applied
askribe-headerThe header element containing header text and header logos
askribe-header-textThe header text
askribe-footerThe footer element containing footer logo, and Fskribe logo
askribe-action-buttonsThe element containing Submit, Skip and Exit buttons
askribe-contentThe element containing consumer contents excluding header, footer and action buttons
askribe-btnAll buttons in consumer
askribe-submit-btnSubmit Button
askribe-exit-btnExit Button
askribe-skip-btnSkip Button
askribe-backPrevious question button
askribe-forwardNext question button
askribe-titleThe title / main content of a block. Not applicable for form title
askribe-title-containerThe element containing title / main of a block and image / video if they exist. Not applicable for form title
askribe-descriptionThe description of a block
askribe-keyboard-shortcutAll elements displaying keyboard shortcuts
askribe-consumer-timerThe element showing elapsed time in consumer
askribe-brand-logoBrand logo
askribe-askribe-logoAskribe logo
askribe-consumerThe element wrapping entirety of consumer
askribe-language-selectorLanguage selection dropdown

Example 1

Code

.askribe-fg {
background-color: palegreen;
}

Result

Example 2

Code

.askribe-header {
background-color: palegreen;
}

Result

Example 3

Code

.askribe-footer {
background-color: palegreen;
}

Result

note

.askribe-title-container includes previous and next block links along with the block title / main content. .askribe-title only includes the block title / main content.

note

For blocks which are Form block items, .askribe-title-container and .askribe-title only include the block title / main content.

Additional Notes

note

Advanced CSS takes precedence over customizations made at same level. For example, if you set font-size to 16px using GUI controls and font-size to 15px using advanced CSS at Block level, font-size of 15px will be applied to the Block in consumer.

note

Advanced CSS follows same precedence rules as properties set through GUI controls across levels. For example, if you set font-size to 16px using GUI controls at Block level and font-size to 15px using advanced CSS at Flow level, font-size of 16px will be applied to the Block in consumer because Block level styling has higher precedence. For precedence rules refer Precedence Order

caution

If you use !important in Advanced CSS, the precedence order cannot be guaranteed. Using !important is considered a bad practice and it should be avoided unless absolutely necessary.