Skip to content

Commit

Permalink
css changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nam-singh committed Sep 13, 2024
1 parent 443b744 commit 274165d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 28 deletions.
10 changes: 5 additions & 5 deletions report-react/src/SavedReport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ const filteredReport = {
<Theme theme="g10">
<div>
<Grid>
<Column sm={2} md={8} lg={4}>
<Column sm={4} md={8} lg={4}>
<div className="summInfo">
<h1 className="prodName">
IBM <strong>Accessibility</strong><br />
Expand All @@ -173,22 +173,22 @@ const filteredReport = {
</Grid>
<section aria-label="Report overview: score cards">
<Grid>
<Column sm={2} md={4} lg={4}>
<Column sm={4} md={4} lg={4}>
<div className="time" style={{paddingTop:"12px"}}>{new Date(this.props.reportData.report.timestamp).toLocaleString()}</div>
<div className="url"><strong>Scanned page:</strong> {this.props.reportData.tabURL}</div>
</Column>
<Column sm={2} md={4} lg={4}>
<Column sm={4} md={4} lg={4}>
<ScoreCard count={violations} title="Violations" icon={Violation16} checked={this.state.selectedItems.some((item)=>item.text==="Violations")}
handleCardClick={this.handleCardClick}>
Accessibility failures that need to be corrected
</ScoreCard>
</Column>
<Column sm={2} md={4} lg={4}>
<Column sm={4} md={4} lg={4}>
<ScoreCard count={needReview} title="Needs review" icon={NeedsReview16} checked={this.state.selectedItems.some((item)=>item.text==="Needs review")} handleCardClick={this.handleCardClick}>
Issues that may not be a violation; manual review is needed
</ScoreCard>
</Column>
<Column sm={2} md={4} lg={4}>
<Column sm={4} md={4} lg={4}>
<ScoreCard count={recommendation} title="Recommendations" icon={Recommendation16} checked={this.state.selectedItems.some((item)=>item.text==="Recommendations")} handleCardClick={this.handleCardClick}>
Opportunities to apply best practices to further improve accessibility
</ScoreCard>
Expand Down
6 changes: 1 addition & 5 deletions report-react/src/ScoreCard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@
}
}

@include breakpoint.breakpoint('sm') {
.cds--css-grid-column:nth-child(even) .scoreCard {
margin-right: -1rem;
}
}

@include breakpoint.breakpoint('md') {
.cds--css-grid-column:nth-child(even) .scoreCard {
margin-right: 0rem;
Expand Down
22 changes: 8 additions & 14 deletions report-react/src/SummScoreCard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,29 @@
.summScoreCard {
margin: 1rem -1rem 0rem -1rem;
padding: 1rem;

box-sizing: border-box;

min-height: 12rem;
border: 1px solid #9E63FB;
background-color: #E8DAFF;

background-color:#be95ff ;
.summaryTitleDetail {
@include type.type-style('helper-text-01');
}

.scLeft {
flex: 0 0 51.25%;
max-width: 51.25%;

@media (min-width: 66rem) {
flex: 0 0 33.75%;
max-width: 33.75%;
}
@include type.type-style('helper-text-01');
}



.title {
@include type.type-style('heading-02');
}

.score {
// @include type.type-style('display-03');
font-size: 96px;
@include type.type-style('heading-07');
font-size: 54px;
margin: 1rem 0rem;
}

@media (min-width: 42rem) {
margin: 1rem 0rem 0rem -1rem;
}
Expand Down
2 changes: 1 addition & 1 deletion report-react/src/SummScoreCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default class SummScoreCard extends React.Component<SummScoreCardProps, {
let summaryNumbers = this.calcSummary(this.props.report);
let currentStatus = summaryNumbers[3].toFixed(0);

return <div className="scoreCard" style={{border: "1px solid #9E63FB", backgroundColor:'#be95ff'}}>
return <div className="summScoreCard" >

<Grid>
<Column sm={2} md={4} lg={4} className="scLeft">
Expand Down
6 changes: 3 additions & 3 deletions report-react/src/report/ReportRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ export default class ReportRow extends React.Component<IReportRowProps, IReportR
}
return <div className="itemRow">
<Grid role="row" aria-expanded={open} className="itemHeader" onClick={this.toggleRow.bind(this)} tabIndex={0} onKeyDown={this.onKeyDown.bind(this)}>
<Column sm={1} md={2} lg={4} role="cell">
<Column sm={2} md={2} lg={4} role="cell" >
{this.state.scrollTo && <div ref={this.scrollRef}></div>}
<span style={{ paddingRight: "14px" }}>{open ? <ChevronUp size={16} /> : <ChevronDown size={16} />}</span>
{vCount > 0 && <> <span>{Violation16}</span><span style={{verticalAlign: "text-top",lineHeight: "8px", margin: ".25rem" }}>{vCount}</span></>}
{nrCount > 0 && <> <span>{NeedsReview16}</span><span style={{verticalAlign: "text-top", lineHeight: "8px" , margin: ".25rem" }}>{nrCount}</span></>}
{rCount > 0 && <><span>&nbsp;{Recommendation16}</span><span style={{ verticalAlign: "text-top", lineHeight: "8px", margin: ".25rem" }}>{rCount}</span> </>}
</Column>
<Column sm={3} md={6} lg={8} role="cell">
<span >{group.title.length === 0 ? "Page" : group.title}</span>
<Column sm={2} md={6} lg={8} role="cell">
<span style={{wordWrap:"break-word"}}>{group.title.length === 0 ? "Page" : group.title}</span>
</Column>
</Grid>
{!open && <Grid className="itemDetail" />}
Expand Down

0 comments on commit 274165d

Please sign in to comment.