French Vanilla
3.00
--- id: 5f45a276c093334f0f6e9df4 title: Step 74 challengeType: 0 dashedName: step-74 --- # --description-- Se consideriamo le voci sul menu e i prezzi, c'è un divario abbastanza grande tra ogni linea. Assegna alle proprietà margin-top e margin-bottom il valore `5px` per tutti gli elementi `p` annidati in elementi di classe `item`. # --hints-- Dovresti assegnare alla proprietà `margin-top` il valore `5px`. ```js const hasMarginTop = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['margin-top'] === '5px'); assert(hasMarginTop); ``` Dovresti assegnare alla proprietà `margin-bottom` il valore `5px`. ```js const hasMarginBottom = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['margin-bottom'] === '5px'); assert(hasMarginBottom); ``` Dovresti utilizzare il selettore `.item p` esistente. ```js const hasOneSelector = new __helpers.CSSHelp(document).getStyleDeclarations('.item p'); assert(hasOneSelector.length === 1); ``` Gli elementi `p` annidati negli elementi `.item` dovrebbero avere una proprietà `margin-top` con il valore `5px`. ```js const itemPMarginTop = new __helpers.CSSHelp(document).getStyle('.item p')?.getPropertyValue('margin-top'); assert(itemPMarginTop === '5px'); ``` Gli elementi `p` annidati negli elementi `.item` dovrebbero avere una proprietà `margin-bottom` con il valore `5px`. ```js const itemPMarginBottom = new __helpers.CSSHelp(document).getStyle('.item p')?.getPropertyValue('margin-bottom'); assert(itemPMarginBottom === '5px'); ``` # --seed-- ## --seed-contents-- ```html