Customization of the threeds.css file - Cascading Style Sheets (CSS)

The modal displayed in the 3DS 2.0 authentication challenge is customizable. To customize it, you can replace the threeds.css file with another, as long as the new file follows the code structure provided below. Ensure to preserve the same class names and style logic to ensure the proper functioning of the modal.

Presentation of the Modal

In 3DS 2.0 authentication, the dimensions of the challenge are standardized through an integer provided in the challengeWindowSize field. It is through this parameter that the size of the content in the challenge is replicated. This field is a parameter in the esitefDoPayment function call in the Carat JavaScript. If no value is provided, a default value will be automatically configured based on the buyer's screen size. The following are the possible values for use:

valuedimensions
1250 x 400
2390 x 400
3500 x 600
4600 x 400

File threeds.css#

Default Modal

.modal-challenge {
display: block;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) translateY(-100%);
background-color: #fff;
border: 1px solid #ccc;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
z-index: 1000;
border-radius: 10px;
opacity: 0;
transition: transform 0.3s ease-out, opacity 0.6s ease;
}
PropertyValueDescription
displayblockSets the modal to be displayed as a block.
positionfixedDefines the fixed position of the modal on the screen.
top50%Centers the modal on the screen.
left50%Positions the modal in the center of the screen.
transformtranslate(-50%, -50%) translateY(-100%)Moves the modal upwards (off the screen) using transformations.
background-color#fffSets the background color of the modal to white.
border1px solid #cccAdds a 1-pixel solid border with a light gray color.
box-shadow0 4px 8px rgba(0, 0, 0, 0.1)Adds a shadow around the modal to give a sense of elevation.
z-index1000Defines the stacking order of the modal (how far above it is in relation to other elements).
border-radius10pxAdds rounded corners to the modal.
opacity0Initially, the modal is transparent.
transitiontransform 0.3s ease-out, opacity 0.6s easeAdds a smooth transition for transformations and opacity.

Modal opening

.modal-challenge.open {
transform: translate(-50%, -50%) translateY(0);
opacity: 1;
}
PropertyValueDescription
transformtranslate(-50%, -50%) translateY(0)Moves the modal to the center position of the screen.
opacity1Makes the modal completely opaque when opened.

Overlay (initially transparent)

.overlay-challenge {
display: block;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0);
z-index: 999;
}
PropertyValueDescription
displayblockMakes the overlay visible.
positionfixedDefines the fixed position of the overlay.
top0Overlay on top of the screen.
left0Overlay on the left side of the screen.
width100%Sets the width of the overlay to cover the entire screen.
height100%Sets the height of the overlay to cover the entire screen.
background-colorrgba(0, 0, 0, 0)Initially, the overlay is transparent.
z-index999Defines the stacking order of the overlay.

Adding to the overlay when the modal is open

.overlay-challenge.open {
background-color: rgba(0, 0, 0, 0.3);
}
PropertyValueDescription
background-colorrgba(0, 0, 0, 0.3)Makes the overlay semi-transparent when the modal is open.